Skip to content

Commit b7a9f48

Browse files
committed
corrected js zero bug and flutter#39998
1 parent 15164fd commit b7a9f48

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎packages/flutter/test/services/asset_bundle_test.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ void main() {
7676
);
7777
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/39998
7878

79-
test('toString works as intended', () async {
79+
test('toString works as intended', () {
8080
final Uri uri = Uri.http('example.org', '/path');
8181
final NetworkAssetBundle bundle = NetworkAssetBundle(uri);
8282

8383
expect(bundle.toString(), 'NetworkAssetBundle#${shortHash(bundle)}($uri)');
84-
});
84+
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/39998
8585
}

‎packages/flutter/test/services/platform_views_test.dart‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,11 @@ void main() {
305305
const AndroidPointerProperties androidPointerProperties = AndroidPointerProperties(id: 0, toolType: 0);
306306
expect(androidPointerProperties.toString(), 'AndroidPointerProperties(id: 0, toolType: 0)');
307307

308+
const double zero = 0.0;
308309
const AndroidPointerCoords androidPointerCoords =
309-
AndroidPointerCoords(orientation: 0.0, pressure: 0.0, size: 0.0, toolMajor: 0.0, toolMinor: 0.0, touchMajor: 0.0, touchMinor: 0.0, x: 0.0, y: 0.0);
310+
AndroidPointerCoords(orientation: zero, pressure: zero, size: zero, toolMajor: zero, toolMinor: zero, touchMajor: zero, touchMinor: zero, x: zero, y: zero);
310311
expect(androidPointerCoords.toString(),
311-
'AndroidPointerCoords(orientation: 0.0, pressure: 0.0, size: 0.0, toolMajor: 0.0, toolMinor: 0.0, touchMajor: 0.0, touchMinor: 0.0, x: 0.0, y: 0.0)');
312+
'AndroidPointerCoords(orientation: $zero, pressure: $zero, size: $zero, toolMajor: $zero, toolMinor: $zero, touchMajor: $zero, touchMinor: $zero, x: $zero, y: $zero)');
312313

313314
final AndroidMotionEvent androidMotionEvent = AndroidMotionEvent(
314315
downTime: 0,
@@ -319,8 +320,8 @@ void main() {
319320
pointerCoords: <AndroidPointerCoords>[],
320321
metaState: 0,
321322
buttonState: 0,
322-
xPrecision: 0.0,
323-
yPrecision: 0.0,
323+
xPrecision: zero,
324+
yPrecision: zero,
324325
deviceId: 0,
325326
edgeFlags: 0,
326327
source: 0,
@@ -335,8 +336,8 @@ void main() {
335336
'pointerCoords: [], '
336337
'metaState: 0, '
337338
'buttonState: 0, '
338-
'xPrecision: 0.0, '
339-
'yPrecision: 0.0, '
339+
'xPrecision: $zero, '
340+
'yPrecision: $zero, '
340341
'deviceId: 0, '
341342
'edgeFlags: 0, '
342343
'source: 0, '

0 commit comments

Comments
 (0)