Fix disassembler tests

db4
Slava Pestov 2008-03-13 03:51:25 -05:00
parent cc5ee16f06
commit bb137bb784
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,6 @@
IN: tools.disassembler.tests IN: tools.disassembler.tests
USING: math tuples prettyprint.backend tools.disassembler ; USING: math tuples prettyprint.backend tools.disassembler
tools.test strings ;
[ ] [ \ + disassemble ] unit-test [ ] [ \ + disassemble ] unit-test
[ ] [ { tuple prettyprint* } disassemble ] unit-test [ ] [ { string pprint* } disassemble ] unit-test

View File

@ -2,7 +2,8 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: io.files io words alien kernel math.parser alien.syntax USING: io.files io words alien kernel math.parser alien.syntax
io.launcher system assocs arrays sequences namespaces qualified io.launcher system assocs arrays sequences namespaces qualified
system math generator.fixup io.encodings.ascii accessors ; system math generator.fixup io.encodings.ascii accessors
generic ;
IN: tools.disassembler IN: tools.disassembler
: in-file "gdb-in.txt" temp-file ; : in-file "gdb-in.txt" temp-file ;
@ -22,6 +23,9 @@ M: pair make-disassemble-cmd
[ number>string write bl ] each [ number>string write bl ] each
] with-file-writer ; ] with-file-writer ;
M: method-spec make-disassemble-cmd
first2 method make-disassemble-cmd ;
: run-gdb ( -- lines ) : run-gdb ( -- lines )
<process> <process>
+closed+ >>stdin +closed+ >>stdin