Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit aa290db

Browse files
committed
fixed front end test, moved tests to abstract away color.tostring
1 parent 26595ac commit aa290db

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

flutter_frontend_server/test/to_string_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// found in the LICENSE file.
44

55
import 'dart:io' as io;
6+
import 'dart:ui' show Color;
67

78
import 'package:engine_repo_tools/engine_repo_tools.dart';
89
import 'package:path/path.dart' as path;
@@ -60,7 +61,7 @@ void main() {
6061
]));
6162
final runResult = io.Process.runSync(dart, <String>[regularDill]);
6263
checkProcessResult(runResult);
63-
var paintString = '"Paint.toString":"Paint(Color(0xffffffff))"';
64+
var paintString = '"Paint.toString":"Paint(${const Color(0xffffffff)})"';
6465
if (buildDir.contains('release')) {
6566
paintString = '"Paint.toString":"Instance of \'Paint\'"';
6667
}

testing/dart/image_filter_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ void main() async {
293293
).toString(),
294294
contains(
295295
'matrix([10.0, 0.0, 0.0, 0.0, 0.0, 10.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -0.0, -0.0, 0.0, 1.0], FilterQuality.low) -> '
296-
'ColorFilter.mode(Color(alpha: 1.0000, red: 0.6706, green: 0.8039, blue: 0.9373, colorSpace: ColorSpace.sRGB), BlendMode.color) -> '
296+
'ColorFilter.mode(${const Color(0xFFABCDEF)}, BlendMode.color) -> '
297297
'blur(20.0, 20.0, repeated) -> '
298298
'blur(30.0, 30.0, mirror)'
299299
),

testing/dart/text_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void testTextStyle() {
8080
);
8181
expect(
8282
ts1.toString(),
83-
equals('TextStyle(color: Color(alpha: 1.0000, red: 0.0000, green: 1.0000, blue: 0.0000, colorSpace: ColorSpace.sRGB), decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, decorationThickness: unspecified, fontWeight: FontWeight.w800, fontStyle: unspecified, textBaseline: unspecified, fontFamily: unspecified, fontFamilyFallback: unspecified, fontSize: 10.0, letterSpacing: unspecified, wordSpacing: unspecified, height: 100.0x, leadingDistribution: unspecified, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified, fontFeatures: unspecified, fontVariations: unspecified)'),
83+
equals('TextStyle(color: ${const Color(0xFF00FF00)}, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, decorationThickness: unspecified, fontWeight: FontWeight.w800, fontStyle: unspecified, textBaseline: unspecified, fontFamily: unspecified, fontFamilyFallback: unspecified, fontSize: 10.0, letterSpacing: unspecified, wordSpacing: unspecified, height: 100.0x, leadingDistribution: unspecified, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified, fontFeatures: unspecified, fontVariations: unspecified)'),
8484
);
8585
expect(
8686
ts2.toString(),

0 commit comments

Comments
 (0)