Skip to content

Commit 88d8fd9

Browse files
committed
Merge branch 'master' into recompile-host.dart
2 parents bff9a9d + 7fc9521 commit 88d8fd9

8 files changed

Lines changed: 41 additions & 9 deletions

File tree

‎integration_tests/wasm/test/hello_world_test.dart‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
@TestOn('wasm')
6+
// TODO: https://github.com/dart-lang/test/issues/2288
7+
@OnPlatform({'firefox': Skip()})
68
// This retry is a regression test for https://github.com/dart-lang/test/issues/2006
79
@Retry(2)
810
library;

‎pkgs/checks/CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
- Add `containsMatchingInOrder` and `containsEqualInOrder` to replace the
99
combined functionality in `containsInOrder`.
1010
- Replace `pairwiseComparesTo` with `pairwiseMatches`.
11+
- Fix a bug where printing the result of a failed deep quality check would
12+
fail with a `TypeError` when comparing large `Map` instances
1113
- Increase SDK constraint to ^3.5.0.
1214

1315
## 0.3.0

‎pkgs/checks/lib/src/describe.dart‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ Iterable<String> _prettyPrint(
7272
Iterable<String> _prettyPrintCollection(
7373
String open, String close, List<Iterable<String>> elements, int maxLength) {
7474
if (elements.length > _maxItems) {
75-
elements.replaceRange(_maxItems - 1, elements.length, [
75+
const ellipsisElement = [
7676
['...']
77-
]);
77+
];
78+
elements.replaceRange(_maxItems - 1, elements.length, ellipsisElement);
7879
}
7980
if (elements.every((e) => e.length == 1)) {
8081
final singleLine = '$open${elements.map((e) => e.single).join(', ')}$close';
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
import 'package:checks/checks.dart';
6+
import 'package:checks/context.dart';
7+
import 'package:test/scaffolding.dart';
8+
9+
void main() {
10+
group('literal', () {
11+
group('truncates large collections', () {
12+
const maxUntruncatedCollection = 25;
13+
final largeList =
14+
List<int>.generate(maxUntruncatedCollection + 1, (i) => i);
15+
test('in lists', () {
16+
check(literal(largeList)).last.equals('...]');
17+
});
18+
test('in sets', () {
19+
check(literal(largeList.toSet())).last.equals('...}');
20+
});
21+
test('in iterables', () {
22+
check(literal(largeList.followedBy([]))).last.equals('...)');
23+
});
24+
test('in maps', () {
25+
final map = Map<int, int>.fromIterables(largeList, largeList);
26+
check(literal(map)).last.equals('...}');
27+
});
28+
});
29+
});
30+
}

‎pkgs/test/CHANGELOG.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
## 1.25.15-wip
22

3-
43
## 1.25.14
54

65
* Use secure random for url secrets.

‎pkgs/test/lib/src/runner/browser/dom.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +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+
// ignore: deprecated_member_use
56
import 'dart:js_util' as js_util;
67

78
import 'package:js/js.dart';

‎pkgs/test/lib/src/runner/browser/post_message_channel.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +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+
// ignore: deprecated_member_use
56
import 'dart:js_util';
67

78
import 'package:stream_channel/stream_channel.dart';

‎pkgs/test/tool/host.dart‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,8 @@ MultiChannel<dynamic> _connectToServer() {
191191
/// the key 'exception' set to true and details in the value for 'data' (coming
192192
/// from `dart.js` due to a load exception).
193193
///
194-
/// Legacy bootstrap implementations send a `{'ready': true}` message as a
195-
/// signal for this host to create a [MessageChannel] and send the port through
196-
/// the frame's `window.onMessage` channel.
197-
///
198-
/// Upcoming bootstrap implementations will send the string 'port' and include a
199-
/// port for a prepared [MessageChannel].
194+
/// Bootstrap implementations send the string 'port' and include a port for a
195+
/// prepared [MessageChannel].
200196
///
201197
/// Returns a [StreamChannel] which will be connected to the frame once the
202198
/// message channel port is active.

0 commit comments

Comments
 (0)