Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zoffixznet/89a9f0713a5199186e9af4216d9b5104 to your computer and use it in GitHub Desktop.
Save zoffixznet/89a9f0713a5199186e9af4216d9b5104 to your computer and use it in GitHub Desktop.
zoffix@VirtualBox:~/CPANPRC/Color$ PERL6_TEST_TIMES=1 prove6 -vlr t/01-new-key-value.t
t/01-new-key-value.t ..
# Short 3-hex
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=60
ok 3 - green is correct
# t=8
ok 4 - blue is correct
# t=8
ok 5 - alpha is correct
# t=7
1..5
ok 1 - .new( hex => '\#fac')
# t=-1333
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=19
ok 3 - green is correct
# t=18
ok 4 - blue is correct
# t=15
ok 5 - alpha is correct
# t=14
1..5
ok 2 - .new( hex => 'fac')
# t=-1333
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=8
ok 3 - green is correct
# t=5
ok 4 - blue is correct
# t=6
ok 5 - alpha is correct
# t=5
1..5
ok 3 - .new(:hex<fac>)
# t=-1333
# Short 4-hex
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=9
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=6
ok 5 - alpha is correct
# t=13
1..5
ok 4 - .new( hex => '\#face')
# t=-1757
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=8
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=6
ok 5 - alpha is correct
# t=6
1..5
ok 5 - .new( hex => 'face')
# t=-1757
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=8
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=5
ok 5 - alpha is correct
# t=5
1..5
ok 6 - .new( :hex<face> )
# t=-1757
# Full 6-hex
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=7
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=7
ok 5 - alpha is correct
# t=6
1..5
ok 7 - .new( hex => '\#0abcde')
# t=-724
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=7
ok 3 - green is correct
# t=5
ok 4 - blue is correct
# t=5
ok 5 - alpha is correct
# t=5
1..5
ok 8 - .new( hex => '0abcde')
# t=-724
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=13
ok 3 - green is correct
# t=7
ok 4 - blue is correct
# t=7
ok 5 - alpha is correct
# t=6
1..5
ok 9 - .new( :hex<0abcde> )
# t=-724
# Full 8-hex
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=8
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=6
ok 5 - alpha is correct
# t=6
1..5
ok 10 - .new( hex => '\#0abcdef4')
# t=-5056
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=6
ok 3 - green is correct
# t=5
ok 4 - blue is correct
# t=5
ok 5 - alpha is correct
# t=5
1..5
ok 11 - .new( hex => '0abcdef4')
# t=-5056
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=5
ok 3 - green is correct
# t=5
ok 4 - blue is correct
# t=5
ok 5 - alpha is correct
# t=5
1..5
ok 12 - .new( :hex<0abcdef4> )
# t=-5056
# RGB tuple
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=8
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=6
ok 5 - alpha is correct
# t=5
1..5
ok 13 - .new( rgb => [22, 42, 72] )
# t=-589
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=23
ok 3 - green is correct
# t=5
ok 4 - blue is correct
# t=5
ok 5 - alpha is correct
# t=5
1..5
ok 14 - .new(:rgb<22 42 72>)
# t=-589
# RGB tuple (decimal form)
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=24
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=6
ok 5 - alpha is correct
# t=6
1..5
ok 15 - .new( rgbd => [.086, .165, .282] )
# t=-1289
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=6
ok 3 - green is correct
# t=5
ok 4 - blue is correct
# t=6
ok 5 - alpha is correct
# t=5
1..5
ok 16 - .new( :rgbd<.086 .165 .282> )
# t=-1289
# RGBA tuple
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=7
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=5
ok 5 - alpha is correct
# t=5
1..5
ok 17 - .new( rgba => [ 22, 42, 72, 88 ] )
# t=-728
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=6
ok 3 - green is correct
# t=5
ok 4 - blue is correct
# t=11
ok 5 - alpha is correct
# t=9
1..5
ok 18 - .new( :rgba<22 42 72 88> )
# t=-728
# RGBA tuple (decimal form)
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=10
ok 3 - green is correct
# t=8
ok 4 - blue is correct
# t=8
ok 5 - alpha is correct
# t=6
1..5
ok 19 - .new( rgbad => [ .086, .165, .282, .345 ] )
# t=-755
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=6
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=9
ok 5 - alpha is correct
# t=7
1..5
ok 20 - .new( :rgbad< .086 .165 .282 .345> )
# t=-755
# CMYK tuple
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=7
ok 3 - green is correct
# t=10
ok 4 - blue is correct
# t=9
ok 5 - alpha is correct
# t=7
1..5
ok 21 - .new( cmyk => [.55, .25, .85, .12] )
# t=-626
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=7
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=6
ok 5 - alpha is correct
# t=6
1..5
ok 22 - .new( :cmyk<.55 .25 .85 .12> )
# t=-626
# HSL tuple
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=8
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=6
ok 5 - alpha is correct
# t=5
1..5
ok 23 - .new( hsl => [ 72, 78, 65] )
# t=-762
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=8
ok 3 - green is correct
# t=8
ok 4 - blue is correct
# t=7
ok 5 - alpha is correct
# t=7
1..5
ok 24 - .new( :hsl< 72 78 65> )
# t=-762
# HSV tuple
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=7
ok 3 - green is correct
# t=6
ok 4 - blue is correct
# t=7
ok 5 - alpha is correct
# t=6
1..5
ok 25 - .new( hsv => [ 90, 60, 70] )
# t=-731
ok 1 - The object is-a '"Color"'
# t=NaN
ok 2 - red is correct
# t=8
ok 3 - green is correct
# t=9
ok 4 - blue is correct
# t=9
ok 5 - alpha is correct
# t=8
1..5
ok 26 - .new( :hsv<90 60 70> )
# t=-731
1..26
ok
All tests successful.
Files=1, Tests=26, 1 wallclock secs ( 0.05 usr 0.00 sys + 1.22 cusr 0.08 csys = 1.35 CPU)
Result: PASS
zoffix@VirtualBox:~/CPANPRC/Color$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment