]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.tools.inspector: actually test something
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 25 Jun 2022 14:56:36 +0000 (09:56 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 25 Jun 2022 14:56:36 +0000 (09:56 -0500)
basis/ui/tools/inspector/inspector-tests.factor

index 7127d5d01afa283ad438117f3805e5d87d2aadd0..b640a67b103071170b70fb69191792a56023bf9c 100644 (file)
@@ -1,28 +1,6 @@
-USING: assocs formatting kernel math math.parser models
-sequences strings tools.test ui.tools.inspector unicode ;
+USING: kernel math models tools.test ui.tools.inspector ;
 
 { } [ \ + <model> <inspector-gadget> com-edit-slot ] unit-test
 
-! Make sure we can click around in the inspector
-{ } [
-    "abcdefg" [
-        swap [ dup number>string ] dip dup
-        dup unicode:printable? [ 1string ] [
-            dup 0xff <= [
-                H{
-                    { CHAR: \a "\\a" }
-                    { CHAR: \b "\\b" }
-                    { CHAR: \e "\\e" }
-                    { CHAR: \f "\\f" }
-                    { CHAR: \n "\\n" }
-                    { CHAR: \r "\\r" }
-                    { CHAR: \t "\\t" }
-                    { CHAR: \v "\\v" }
-                    { CHAR: \0 "\\0" }
-                } ?at [ "\\x%02x" sprintf ] unless
-            ] [
-                "\\u{%x}" sprintf
-            ] if
-        ] if slot-description boa
-    ] { } map-index-as drop
-] unit-test
\ No newline at end of file
+! Make sure we can click around in the inspector; map-index regression
+{ } [ "abcdefg" make-slot-descriptions drop ] unit-test