Skip to content
This repository was archived by the owner on May 15, 2023. It is now read-only.

Commit 8a559fb

Browse files
authored
Update tests for the latest Sass version (#25)
1 parent 2f4fb06 commit 8a559fb

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

test/function_test.dart

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -391,73 +391,73 @@ void main() {
391391
group("without alpha:", () {
392392
group("hue", () {
393393
test("0", () async {
394-
expect(await _protofy('hsl(0, 50, 50)'), _rgb(191, 64, 64, 1.0));
394+
expect(await _protofy('hsl(0, 50%, 50%)'), _rgb(191, 64, 64, 1.0));
395395
});
396396

397397
test("360", () async {
398398
expect(
399-
await _protofy('hsl(360, 50, 50)'), _rgb(191, 64, 64, 1.0));
399+
await _protofy('hsl(360, 50%, 50%)'), _rgb(191, 64, 64, 1.0));
400400
});
401401

402402
test("below 0", () async {
403403
expect(
404-
await _protofy('hsl(-100, 50, 50)'), _rgb(106, 64, 191, 1.0));
404+
await _protofy('hsl(-100, 50%, 50%)'), _rgb(106, 64, 191, 1.0));
405405
});
406406

407407
test("between 0 and 360", () async {
408408
expect(
409-
await _protofy('hsl(100, 50, 50)'), _rgb(106, 191, 64, 1.0));
409+
await _protofy('hsl(100, 50%, 50%)'), _rgb(106, 191, 64, 1.0));
410410
});
411411

412412
test("above 360", () async {
413413
expect(
414-
await _protofy('hsl(560, 50, 50)'), _rgb(64, 149, 191, 1.0));
414+
await _protofy('hsl(560, 50%, 50%)'), _rgb(64, 149, 191, 1.0));
415415
});
416416
});
417417

418418
group("saturation", () {
419419
test("0", () async {
420-
expect(await _protofy('hsl(0, 0, 50)'), _rgb(128, 128, 128, 1.0));
420+
expect(await _protofy('hsl(0, 0%, 50%)'), _rgb(128, 128, 128, 1.0));
421421
});
422422

423423
test("100", () async {
424-
expect(await _protofy('hsl(0, 100, 50)'), _rgb(255, 0, 0, 1.0));
424+
expect(await _protofy('hsl(0, 100%, 50%)'), _rgb(255, 0, 0, 1.0));
425425
});
426426

427427
test("in the middle", () async {
428-
expect(await _protofy('hsl(0, 42, 50)'), _rgb(181, 74, 74, 1.0));
428+
expect(await _protofy('hsl(0, 42%, 50%)'), _rgb(181, 74, 74, 1.0));
429429
});
430430
});
431431

432432
group("lightness", () {
433433
test("0", () async {
434-
expect(await _protofy('hsl(0, 50, 0)'), _rgb(0, 0, 0, 1.0));
434+
expect(await _protofy('hsl(0, 50%, 0%)'), _rgb(0, 0, 0, 1.0));
435435
});
436436

437437
test("100", () async {
438438
expect(
439-
await _protofy('hsl(0, 50, 100)'), _rgb(255, 255, 255, 1.0));
439+
await _protofy('hsl(0, 50%, 100%)'), _rgb(255, 255, 255, 1.0));
440440
});
441441

442442
test("in the middle", () async {
443-
expect(await _protofy('hsl(0, 50, 42)'), _rgb(161, 54, 54, 1.0));
443+
expect(await _protofy('hsl(0, 50%, 42%)'), _rgb(161, 54, 54, 1.0));
444444
});
445445
});
446446
});
447447

448448
group("with alpha", () {
449449
test("0", () async {
450-
expect(await _protofy('hsl(10, 20, 30, 0)'),
450+
expect(await _protofy('hsl(10, 20%, 30%, 0)'),
451451
equals(_rgb(92, 66, 61, 0.0)));
452452
});
453453

454454
test("1", () async {
455-
expect(await _protofy('hsl(10, 20, 30, 1)'),
455+
expect(await _protofy('hsl(10, 20%, 30%, 1)'),
456456
equals(_rgb(92, 66, 61, 1.0)));
457457
});
458458

459459
test("between 0 and 1", () async {
460-
expect(await _protofy('hsl(10, 20, 30, 0.123)'),
460+
expect(await _protofy('hsl(10, 20%, 30%, 0.123)'),
461461
equals(_rgb(92, 66, 61, 0.123)));
462462
});
463463
});

test/protocol_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ void main() {
242242
process.inbound.add(compileString("a {b: 1px + 1em}"));
243243

244244
var failure = getCompileFailure(await process.outbound.next);
245-
expect(failure.message, equals("Incompatible units em and px."));
245+
expect(failure.message, equals("1px and 1em have incompatible units."));
246246
expect(failure.span.text, "1px + 1em");
247247
expect(failure.span.start, equals(location(6, 0, 6)));
248248
expect(failure.span.end, equals(location(15, 0, 15)));

0 commit comments

Comments
 (0)