From 72e19fe79af9188e21db108d9dc17f0812077ee8 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 18 Jul 2015 18:28:00 -0700 Subject: [PATCH] ui.gadgets.grid-lines: fix tests. --- .../grid-lines/grid-lines-tests.factor | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/basis/ui/gadgets/grid-lines/grid-lines-tests.factor b/basis/ui/gadgets/grid-lines/grid-lines-tests.factor index 9baae3a15e..dfa40aadba 100644 --- a/basis/ui/gadgets/grid-lines/grid-lines-tests.factor +++ b/basis/ui/gadgets/grid-lines/grid-lines-tests.factor @@ -2,29 +2,30 @@ IN: ui.gadgets.grid-lines.tests USING: tools.test ui.gadgets ui.gadgets.grid-lines ui.gadgets.grid-lines.private ui.gadgets.grids.private accessors arrays ui.gadgets.grids sorting kernel ; -: 100x100 ( -- gadget ) { 100 100 } >>dim ; +: 100x100 ( -- gadget ) + { 100 100 } >>dim ; { { - { { 0 0 } { 0 101 } } - { { 0 0 } { 101 0 } } - { { 0 100 } { 101 100 } } - { { 100 0 } { 100 101 } } + { { 0.0 0.0 } { 0.0 100.0 } } + { { 0.0 0.0 } { 100.0 0.0 } } + { { 0.0 100.0 } { 100.0 100.0 } } + { { 100.0 0.0 } { 100.0 100.0 } } } } [ 100x100 1array 1array - { 100 100 } >>dim + { 100.0 100 } >>dim compute-grid-lines natural-sort ] unit-test { { - { { 5 5 } { 5 116 } } - { { 5 5 } { 116 5 } } - { { 5 115 } { 116 115 } } - { { 115 5 } { 115 116 } } + { { 5.0 5.0 } { 5.0 115.0 } } + { { 5.0 5.0 } { 115.0 5.0 } } + { { 5.0 115.0 } { 115.0 115.0 } } + { { 115.0 5.0 } { 115.0 115.0 } } } } [ 100x100 1array @@ -37,28 +38,28 @@ ui.gadgets.grids.private accessors arrays ui.gadgets.grids sorting kernel ; { { - { { 0 0 } { 0 201 } } - { { 0 0 } { 201 0 } } - { { 0 100 } { 201 100 } } - { { 0 200 } { 201 200 } } - { { 100 0 } { 100 201 } } - { { 200 0 } { 200 201 } } + { { 0.0 0.0 } { 0.0 200.0 } } + { { 0.0 0.0 } { 200.0 0.0 } } + { { 0.0 100.0 } { 200.0 100.0 } } + { { 0.0 200.0 } { 200.0 200.0 } } + { { 100.0 0.0 } { 100.0 200.0 } } + { { 200.0 0.0 } { 200.0 200.0 } } } } [ 100x100 100x100 2array 100x100 100x100 2array 2array - { 200 200 } >>dim + { 200.0 200 } >>dim compute-grid-lines natural-sort ] unit-test { { - { { 0 0 } { 0 3 } } - { { 2 0 } { 2 3 } } - { { 0 0 } { 3 0 } } - { { 0 2 } { 3 2 } } + { { 0.5 0.5 } { 0.5 2.5 } } + { { 2.5 0.5 } { 2.5 2.5 } } + { { 0.5 0.5 } { 2.5 0.5 } } + { { 0.5 2.5 } { 2.5 2.5 } } } } [ { 1 1 } >>dim