charts.lines: add tests for 2-point-chunk

char-rename
Alexander Iljin 2017-01-19 13:13:47 +03:00 committed by John Benediktsson
parent 29a8b9285b
commit cfd271aa88
1 changed files with 24 additions and 0 deletions

View File

@ -23,6 +23,30 @@ IN: charts.lines.tests
[ { 1 } last2 ] must-fail
[ { } last2 ] must-fail
! 2-point-chunk upwards
{
{ { -3 -3 } { 3 3 } }
} [
{ { -6 0 } { -5 -5 } } { { 5 5 } { 6 0 } }
-3 3 2-point-chunk
] unit-test
! 2-point-chunk downwards
{
{ { -3 3 } { 3 -3 } }
} [
{ { -6 0 } { -5 5 } } { { 5 -5 } { 6 0 } }
-3 3 2-point-chunk
] unit-test
! 2-point-chunk: same x coord
{
{ { -5 -3 } { -5 3 } }
} [
{ { -6 0 } { -5 -5 } } { { -5 5 } { 6 0 } }
-3 3 2-point-chunk
] unit-test
! tight bounds
{
{ { { 0 0 } { 0 1 } { 1 2 } { 1 3 } { 2 5 } } }