Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/dart.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration_tests/wasm/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ stages:
- which google-chrome-beta
os:
- linux
- test:
# The config here is a regression test for https://github.com/dart-lang/test/issues/2006
- test: --timeout=60s
os:
- linux
3 changes: 3 additions & 0 deletions integration_tests/wasm/test/hello_world_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// 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.

@TestOn('wasm')
// This retry is a regression test for https://github.com/dart-lang/test/issues/2006
@Retry(2)
import 'package:test/test.dart';

void main() {
Expand Down
2 changes: 2 additions & 0 deletions pkgs/test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## 1.24.3-wip

* Fix compatibility with wasm number semantics.

## 1.24.2

* Copy an existing nonce from a script on the test HTML page to the script
Expand Down
4 changes: 2 additions & 2 deletions pkgs/test/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ dependencies:
webkit_inspection_protocol: ^1.0.0
yaml: ^3.0.0
# Use an exact version until the test_api and test_core package are stable.
test_api: 0.5.2
test_core: 0.5.2
test_api: 0.5.3
test_core: 0.5.3
# Use a tight version constraint to ensure that a constraint on matcher
# properly constrains all features it provides.
matcher: '>=0.12.15 <0.12.16'
Expand Down
6 changes: 3 additions & 3 deletions pkgs/test/tool/host.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ void main() {
serverChannel.stream.listen((message) {
if (message['command'] == 'loadSuite') {
var suiteChannel =
serverChannel.virtualChannel(message['channel'] as int);
var iframeChannel =
_connectToIframe(message['url'] as String, message['id'] as int);
serverChannel.virtualChannel((message['channel'] as num).toInt());
var iframeChannel = _connectToIframe(
message['url'] as String, (message['id'] as num).toInt());
suiteChannel.pipe(iframeChannel);
} else if (message['command'] == 'displayPause') {
dom.document.body!.classList.add('paused');
Expand Down
4 changes: 4 additions & 0 deletions pkgs/test_api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.3-wip

* Fix compatibility with wasm number semantics.

## 0.5.2

* Remove deprecation for the `scaffolding.dart` and `backend.dart` libraries.
Expand Down
5 changes: 3 additions & 2 deletions pkgs/test_api/lib/src/backend/metadata.dart
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class Metadata {
skipReason = serialized['skipReason'] as String?,
_verboseTrace = serialized['verboseTrace'] as bool?,
_chainStackTraces = serialized['chainStackTraces'] as bool?,
_retry = serialized['retry'] as int?,
_retry = (serialized['retry'] as num?)?.toInt(),
tags = Set.from(serialized['tags'] as Iterable),
onPlatform = {
for (var pair in serialized['onPlatform'] as List)
Expand All @@ -282,7 +282,8 @@ class Metadata {
if (serialized == 'none') return Timeout.none;
var scaleFactor = serialized['scaleFactor'];
if (scaleFactor != null) return Timeout.factor(scaleFactor as num);
return Timeout(Duration(microseconds: serialized['duration'] as int));
return Timeout(
Duration(microseconds: (serialized['duration'] as num).toInt()));
}

/// Throws an [ArgumentError] if any tags in [tags] aren't hyphenated
Expand Down
2 changes: 1 addition & 1 deletion pkgs/test_api/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: test_api
version: 0.5.2
version: 0.5.3-wip
description: >-
The user facing API for structuring Dart tests and checking expectations.
repository: https://github.com/dart-lang/test/tree/master/pkgs/test_api
Expand Down
2 changes: 2 additions & 0 deletions pkgs/test_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## 0.5.3-wip

* Fix compatibility with wasm number semantics.

## 0.5.2

* Use the version `0.5.2` of `packge:test_api`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class _Deserializer {
var metadata = Metadata.deserialize(test['metadata']);
var trace =
test['trace'] == null ? null : Trace.parse(test['trace'] as String);
var testChannel = _channel.virtualChannel(test['channel'] as int);
var testChannel = _channel.virtualChannel((test['channel'] as num).toInt());
return RunnerTest(test['name'] as String, metadata, trace, testChannel);
}
}
3 changes: 2 additions & 1 deletion pkgs/test_core/lib/src/runner/runner_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class RunnerTest extends Test {
// this virtual channel and cause the spawned isolate to close as
// well.
spawnHybridUri(message['url'] as String, message['message'], suite)
.pipe(testChannel.virtualChannel(message['channel'] as int));
.pipe(testChannel
.virtualChannel((message['channel'] as num).toInt()));
break;
}
}, onDone: () {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/test_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies:
# matcher is tightly constrained by test_api
matcher: ^0.12.11
# Use an exact version until the test_api package is stable.
test_api: 0.5.2
test_api: 0.5.3

dev_dependencies:
lints: '>=1.0.0 <3.0.0'
6 changes: 5 additions & 1 deletion tool/ci.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.