From 42e02242589c439bf4d9b9c36388d8be9cfc985b Mon Sep 17 00:00:00 2001 From: Alexander Iljin Date: Sun, 22 Jan 2017 01:16:21 +0300 Subject: [PATCH] charts.lines: add a test for y-in-bounds? --- lines/lines-tests.factor | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lines/lines-tests.factor b/lines/lines-tests.factor index 0e8ee00b56..670322e82f 100644 --- a/lines/lines-tests.factor +++ b/lines/lines-tests.factor @@ -297,4 +297,11 @@ IN: charts.lines.tests { { 4.5 0 } { 5 1 } { 6 1 } } clip-data ] unit-test +! just a little off the top +{ t } [ + { 0 99 } + { { 0 100 } { 100 0 } { 100 50 } { 150 50 } { 200 100 } } + y-in-bounds? +] unit-test + ! TODO: add tests where after search there is no adjustment necessary, so that extra adjustment would take bad elements.