]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/gadgets/line-support/line-support-tests.factor
more test IN: cleanup.
[factor.git] / basis / ui / gadgets / line-support / line-support-tests.factor
1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors arrays kernel tools.test ui.gadgets.editors
4 ui.gadgets.line-support ui.gadgets.line-support.private ui.text ;
5
6 ! line-gadget-height
7 { t } [
8     { 0 0 } <multiline-editor>
9     [ 1 >>min-rows line-gadget-height ]
10     [ line-height ] bi =
11 ] unit-test
12
13 ! line-gadget-width
14 { t } [
15     { 0 0 } <multiline-editor>
16     [ 1 >>min-cols line-gadget-width ]
17     [ font>> em ] bi =
18 ] unit-test
19
20 ! pref-viewport-dim*
21 { t } [
22     <multiline-editor>
23     [ 1 >>min-rows 1 >>min-cols pref-viewport-dim* ] [
24         [ font>> "m" text-width ] [ line-height ] bi 2array
25     ] bi =
26 ] unit-test