]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.image-analyzer.gc-info.tests: fix word>gc-info-expected word,
authorBjörn Lindqvist <bjourne@gmail.com>
Sat, 15 Aug 2015 04:06:01 +0000 (06:06 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 15 Aug 2015 20:39:05 +0000 (13:39 -0700)
fixes #1436

extra/tools/image-analyzer/gc-info/gc-info-tests.factor

index 6234c40b1ad739a297b98b8cb69d587a3c9e4a0d..e28b55f3fc98de325942a4c962bdb3010ae25b12 100644 (file)
@@ -1,5 +1,5 @@
 USING: accessors alien.c-types alien.syntax arrays assocs bit-arrays
-classes.struct combinators combinators.short-circuit compiler
+classes.struct combinators combinators.short-circuit compiler compiler.cfg
 compiler.cfg.debugger compiler.cfg.instructions compiler.cfg.linearization
 compiler.cfg.stack-frame compiler.codegen.gc-maps compiler.units fry generic
 grouping io io.encodings.binary io.streams.byte-array kernel math namespaces
@@ -10,6 +10,7 @@ IN: tools.image-analyzer.gc-info.tests
 QUALIFIED: cpu.x86.features.private
 QUALIFIED: crypto.aes.utils
 QUALIFIED: effects
+QUALIFIED: gtk-samples.opengl
 QUALIFIED: opencl
 
 : normal? ( word -- ? )
@@ -35,7 +36,7 @@ QUALIFIED: opencl
 
 ! Like word>gc-info but uses the compiler
 : word>gc-info-expected ( word -- seq/f )
-    test-regs first cfg>gc-maps tally-gc-maps ;
+    test-regs first [ cfg set ] [ cfg>gc-maps tally-gc-maps ] bi ;
 
 ! Handle f f as input. Deferred words don't have any gc-info. See #1394.
 : same-gc-info? ( compiler-gc-info/f gc-info/f -- ? )
@@ -127,6 +128,12 @@ FUNCTION: void LLVMDisposeTypeHandle ( LLVMTypeHandleRef TypeHandle )
     [ word>gc-info-expected ] [ word>gc-info ] bi same-gc-info?
 ] unit-test
 
+! #1436
+{ t } [
+    \ gtk-samples.opengl:opengl-main
+    [ word>gc-info-expected ] [ word>gc-info ] bi same-gc-info?
+] unit-test
+
 ! Ensure deterministic gc map generation.
 : recompile-word>gc-info ( word -- gc-info )
     [ 1array compile ] keep word>gc-info ;