Files
sdk/tests/web/wasm/multi_module_stress_test.dart
T
Nate Biggs 3b056e1d50 [dart2wasm] Fix deferred loading tests on optimized configs.
Add -O0 to failing tests so that binaryen is not run on them in any configuration.

Also skip 'multi_module_stress_test' on d8/jsshell/jsc as these runtimes fail when trying to create a DataView of the necessary files:
https://github.com/dart-lang/sdk/blob/main/sdk/lib/_internal/wasm/lib/js_typed_array.dart#L2460

Bug: https://github.com/dart-lang/sdk/issues/59736
Change-Id: Iccc96fde01776f0179c888ac6bbe13a81d0ee847
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401380
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-12-18 01:14:17 -08:00

34 lines
1.1 KiB
Dart

// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// dart2wasmOptions=--extra-compiler-option=--enable-multi-module-stress-test-mode --extra-compiler-option=--no-js-compatibility -O0
import 'package:async_helper/async_helper.dart';
import 'package:compiler/src/util/memory_compiler.dart' as dart2js;
import 'package:expect/expect.dart';
import 'data_loader_helper.dart';
main() async {
asyncStart();
final main = 'main.dart';
final entryPoint = Uri.parse('memory:$main');
final platformDillBytes = await loadFileWrapper(
'../../../dart2js_platform.dill',
);
final result = await dart2js.runCompiler(
entryPoint: entryPoint,
memorySourceFiles: {
main: 'main() {}',
'package.yaml': '{ "configVersion": 1, "packages": []}',
'binaries': '',
'dart2js_platform.dill': platformDillBytes,
},
packageConfig: Uri.parse('memory:package.yaml'),
platformBinaries: Uri.parse('memory:binaries'),
);
Expect.isTrue(result.isSuccess);
asyncEnd();
}