@@ -391,73 +391,73 @@ void main() {
391
391
group ("without alpha:" , () {
392
392
group ("hue" , () {
393
393
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 ));
395
395
});
396
396
397
397
test ("360" , () async {
398
398
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 ));
400
400
});
401
401
402
402
test ("below 0" , () async {
403
403
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 ));
405
405
});
406
406
407
407
test ("between 0 and 360" , () async {
408
408
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 ));
410
410
});
411
411
412
412
test ("above 360" , () async {
413
413
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 ));
415
415
});
416
416
});
417
417
418
418
group ("saturation" , () {
419
419
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 ));
421
421
});
422
422
423
423
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 ));
425
425
});
426
426
427
427
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 ));
429
429
});
430
430
});
431
431
432
432
group ("lightness" , () {
433
433
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 ));
435
435
});
436
436
437
437
test ("100" , () async {
438
438
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 ));
440
440
});
441
441
442
442
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 ));
444
444
});
445
445
});
446
446
});
447
447
448
448
group ("with alpha" , () {
449
449
test ("0" , () async {
450
- expect (await _protofy ('hsl(10, 20, 30, 0)' ),
450
+ expect (await _protofy ('hsl(10, 20% , 30% , 0)' ),
451
451
equals (_rgb (92 , 66 , 61 , 0.0 )));
452
452
});
453
453
454
454
test ("1" , () async {
455
- expect (await _protofy ('hsl(10, 20, 30, 1)' ),
455
+ expect (await _protofy ('hsl(10, 20% , 30% , 1)' ),
456
456
equals (_rgb (92 , 66 , 61 , 1.0 )));
457
457
});
458
458
459
459
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)' ),
461
461
equals (_rgb (92 , 66 , 61 , 0.123 )));
462
462
});
463
463
});
0 commit comments