From c8e22fbd920e84b442f8d83bff3f97678223ee5f Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Sat, 24 Aug 2019 15:45:08 +0000 Subject: [PATCH] changed to call printf in test-bi --- moo/kernel/test-bi.moo | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/moo/kernel/test-bi.moo b/moo/kernel/test-bi.moo index 35ea872..800acaf 100644 --- a/moo/kernel/test-bi.moo +++ b/moo/kernel/test-bi.moo @@ -37,7 +37,7 @@ class MyObject(Object) method(#class) testBigintDiv2 { - | ffi i q r divd divr divd_ubound divr_ubound now x | + | ffi now | ffi := FFI new: 'libc.so.6'. @@ -46,8 +46,10 @@ class MyObject(Object) ffi call: #srandom signature: 'i>' arguments: ##(now). [ + | i q r divd divr divd_ubound divr_ubound x | divr_ubound := 16rFFFFFFFFFFFFFFFFFFFFFFFF. divd_ubound := 16rFFFFFFFFFFFFFFFFFFFFFFFF. + i := 0. while (true) { @@ -74,12 +76,14 @@ class MyObject(Object) }. if (divr = 0) { divr := 1 }. + i := i + 1. + ffi call: #printf signature: 's|l>l' arguments: ##("%d\r", i). + q := divd div: divr. r := divd rem: divr. if (divd ~= (q * divr + r)) { // dump numbers if result is wrong - i dump. divd dump. divr dump. q dump.