Skip to content

Commit 124b98b

Browse files
natebiggsCommit Queue
authored andcommitted
[dart2js] Move tests from tests/web that are failing on DDC configurations into dart2js specific folder.
Also update dart2jsOptions on some tests that are failing on production/O0 configurations. Change-Id: Ie0a8fa56dc391c98186f1573a76cff7ef6afde8d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433563 Reviewed-by: Mayank Patke <[email protected]>
1 parent 8ccc188 commit 124b98b

File tree

54 files changed

+133
-49
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+133
-49
lines changed

pkg/compiler/lib/src/kernel/dart2js_target.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ const Iterable<String> _allowedDartSchemePaths = [
4242
List<Pattern> _allowedNativeTestPatterns = [
4343
RegExp(r'(?<!generated_)tests/web/native'),
4444
RegExp(r'(?<!generated_)tests/web/internal'),
45+
RegExp(r'(?<!generated_)tests/web/dart2js'),
4546
'generated_tests/web/native/native_test',
46-
'generated_tests/web/internal/deferred_url_test',
47+
'generated_tests/web/dart2js/deferred_url_test',
4748
'pkg/front_end/testcases/dart2js/native',
4849
];
4950

pkg/compiler/lib/src/options.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,8 @@ class CompilerOptions implements DiagnosticOptions {
11551155
environment['dart.web.assertions_enabled'] = '$enableUserAssertions';
11561156
environment['dart.tool.dart2js'] = '${true}';
11571157
environment['dart.tool.dart2js.minify'] = '$enableMinification';
1158+
environment['dart.tool.dart2js.disable_rti_optimization'] =
1159+
'$disableRtiOptimization';
11581160
// Eventually pragmas and commandline flags should be aligned so that users
11591161
// setting these flag is equivalent to setting the relevant pragmas
11601162
// globally.

pkg/expect/lib/variations.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,15 @@ bool get checkedParameters =>
130130
bool get checkedImplicitDowncasts =>
131131
!const bool.fromEnvironment('dart.tool.dart2js.types:trust');
132132

133+
/// Whether RTI optimizations are disabled at compile time.
134+
///
135+
/// This can cause some type errors to present differently than they otherwise
136+
/// would. For example, when these optimizations are disabled ArgumentErrors may
137+
/// present as TypeErrors instead.
138+
bool get rtiOptimizationsDisabled =>
139+
const bool.fromEnvironment('dart.tool.dart2js.disable_rti_optimization',
140+
defaultValue: true);
141+
133142
/// Whether explicit casts are type checked at runtime.
134143
///
135144
/// An expression like `e as String` should perform a runtime check that the

tests/web/bounds_check4a_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// dart2jsOptions=--strong
5+
// dart2jsOptions=-O1
66

77
import 'package:expect/expect.dart';
88

tests/web/bounds_check4b_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// dart2jsOptions=--strong
5+
// dart2jsOptions=-O1
66

77
import 'package:expect/expect.dart';
88

tests/web/checked_setter_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// dart2jsOptions=-O1
6+
57
// Formatting can break multitests, so don't format them.
68
// dart format off
79

tests/web/conditional_rewrite_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// dart2jsOptions=-O1
6+
57
import "package:expect/expect.dart";
68

79
// Test that dart2js does not rewrite conditional into logical operators

tests/web/consistent_add_error_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// dart2jsOptions=-O1
6+
57
import "package:expect/expect.dart";
68

79
// Test that optimized '+' and slow path '+' produce the same error.

tests/web/consistent_codeUnitAt_error_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// dart2jsOptions=-O1
6+
57
import "package:expect/expect.dart";
68

79
// Test that optimized codeUnitAt and slow path codeUnitAt produce the same

tests/web/consistent_type_error_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// dart2jsOptions=-O1
6+
57
// Test that type checks give consistent errors for the same types. In minified
68
// mode this checks that the minified class names are consistently tagged.
79

0 commit comments

Comments
 (0)