Skip to content

Commit

Permalink
Distingush between 32-bit and 64-bit test output.
Browse files Browse the repository at this point in the history
  • Loading branch information
kstephens committed May 12, 2012
1 parent 35fd79a commit 944bc19
Show file tree
Hide file tree
Showing 16 changed files with 3,951 additions and 4 deletions.
3,641 changes: 3,641 additions & 0 deletions core/t/inspect_test.64.exp

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions core/t/integer_test.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

~ 123 => tort_send(tort__s(INV), 0x1ed) => -124

~ 4 => tort_send(tort__s(INV), 0x11) => -5

~ -123 => tort_send(tort__s(INV), 0xfffffffffffffe15) => 122

- 123 => tort_send(tort__s(NEG), 0x1ed) => -123

- 4 => tort_send(tort__s(NEG), 0x11) => -4

- -123 => tort_send(tort__s(NEG), 0xfffffffffffffe15) => 123

123 + 4 => 127

123 - 4 => 119

123 * 4 => 492

123 / 4 => 30

123 & 4 => 0

123 | 4 => 127

123 ^ 4 => 127

123 % 4 => 3

123 << 4 => 1968

123 >> 4 => 7

! 123 => false

! 0 => true

! 1 => false

123 && 4 => true

0 && 0 => false

0 && 1 => false

1 && 1 => true

123 || 4 => true

0 || 0 => false

0 || 1 => true

1 || 1 => true

123 == 4 => false

0 == 0 => true

0 == 1 => false

1 == 1 => true

123 != 4 => true

0 != 0 => false

0 != 1 => true

1 != 1 => false

123 < 4 => false

0 < 0 => false

0 < 1 => true

1 < 1 => false

123 > 4 => true

0 > 0 => false

0 > 1 => false

1 > 1 => false

123 <= 4 => false

0 <= 0 => true

0 <= 1 => true

1 <= 1 => true

123 >= 4 => true

0 >= 0 => true

0 >= 1 => false

1 >= 1 => true

DONE
40 changes: 40 additions & 0 deletions core/t/map_test.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

_mt_map => @map( nil,
<=> => @method(map::<=>,@0x1),
_gc_mark => @method(map::_gc_mark,@0x2),
_inspect => @method(map::_inspect,@0x3),
add => @method(map::add,@0x4),
clone => @method(map::clone,@0x5),
delete => @method(map::delete,@0x6),
emit => @method(map::emit,@0x7),
equal? => @method(map::equal?,@0x8),
get => @method(map::get,@0x9),
get_entry => @method(map::get_entry,@0x10),
get_entry_by_value => @method(map::get_entry_by_value,@0x11),
get_entry_cstr => @method(map::get_entry_cstr,@0x12),
get_entry_string => @method(map::get_entry_string,@0x13),
get_key => @method(map::get_key,@0x14),
get_string => @method(map::get_string,@0x15),
initialize => @method(map::initialize,@0x16),
set => @method(map::set,@0x17),
equality => @method(map::equality,@0x18),
equality= => @method(map::equality=,@0x19),
equality& => @method(map::equality&,@0x20) )
o => @map( nil,
)
(size o) => 0
o => @map( nil,
1 => 2 )
(size o) => 1
o => @map( nil,
1 => 3 )
(size o) => 1
o => @map( nil,
1 => 3,
3 => 4 )
(size o) => 2
o => @map( nil,
3 => 4 )
(size o) => 1

DONE
3 changes: 3 additions & 0 deletions core/t/message_test.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Some object ==> ( @message( clone, @message(@0x1), @method(object::clone,@0x2), @mtable(object), "src/message.c:43") ) <== is in here!

DONE
14 changes: 14 additions & 0 deletions core/t/popen_test.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

read up to 64 chars from popen("echo 12345", "r") => "12345
"
(eof o) => 1
(size v) => 6


read up to 64 chars from popen("echo 12345", "r") => "12345
"
(eof o) => 1
(size v) => 6


DONE
4 changes: 4 additions & 0 deletions core/t/printf_test.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
HELLO!
printf(...) => "{{@pair(true,false)}}"

DONE
4 changes: 4 additions & 0 deletions core/t/symbols_test.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
v = size
(size symbols) => 1070

DONE
3 changes: 3 additions & 0 deletions core/t/symtab_test.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(size _symtab) => 1153

DONE
4 changes: 4 additions & 0 deletions core/t/tagged_test.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tort_i(123) => 493
tort_I(493) => 123

DONE
12 changes: 12 additions & 0 deletions core/t/tort_test.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

tort debugger:
rcvr = @io(stdout)
type = @mtable(io)
expr = nil
backtrace =
----
@message( __debugger, @io(stdout), @method(object::__debugger,@0x1), @mtable(object), "t/tort_test.c:10")
----
HELLO!

DONE
1 change: 1 addition & 0 deletions core/t/word_size.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
64
10 changes: 10 additions & 0 deletions core/t/word_size.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include "tort/tort.h"

#include <stdio.h>

int main(int argc, char **argv, char **environ)
{
printf("%d\n", (int) (sizeof(tort_v) * 8));
return 0;
}

43 changes: 43 additions & 0 deletions ext/t/fiber_test.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
fiber a = @0x1
fiber a @0x1 20
fiber a = @0x2
fiber a @0x2 19
fiber a = @0x3
fiber a @0x3 18
fiber a = @0x4
fiber a @0x4 17
fiber a = @0x5
fiber a @0x5 16
fiber a = @0x6
fiber a @0x6 15
fiber a = @0x7
fiber a @0x7 14
fiber a = @0x8
fiber a @0x8 13
fiber a = @0x9
fiber a @0x9 12
fiber a = @0x10
fiber a @0x10 11
fiber a = @0x11
fiber a @0x11 10
fiber a = @0x12
fiber a @0x12 9
fiber a = @0x13
fiber a @0x13 8
fiber a = @0x14
fiber a @0x14 7
fiber a = @0x15
fiber a @0x15 6
fiber a = @0x16
fiber a @0x16 5
fiber a = @0x17
fiber a @0x17 4
fiber a = @0x18
fiber a @0x18 3
fiber a = @0x19
fiber a @0x19 2
fiber a = @0x20
fiber a @0x20 1
fiber a = @0x21

DONE
57 changes: 57 additions & 0 deletions lisp/t/lisp_test.64.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

tort error: method not found
tort error: selector lisp_repl
tort error: receiver @io(stdin)
tort error: mtable @mtable(io)
tort error: message @message( lisp_repl, @io(stdin), @method(#<unknown>,@0x1), @mtable(io), "t/lisp_test.c:41")

tort error: : not applicable

tort debugger:
rcvr = @message( lisp_repl, @io(stdin), @method(#<unknown>,@0x1), @mtable(io), "t/lisp_test.c:41")
type = @mtable(message)
expr = nil
backtrace =
----
@message( __debugger, @message(@0x2), @method(object::__debugger,@0x3), @mtable(object), "src/error.c:38")
@message( lisp_repl, @io(stdin), @method(#<unknown>,@0x1), @mtable(io), "t/lisp_test.c:41")
----
v => @vector( nil, nil, nil, nil, nil, nil, nil, nil, nil, nil )
v as lisp object => #(() () () () () () () () () ())
read lisp object from stdin: (read o) => (hash-semi-comment nothing nil () nil nil symbol symbol string "string" number 123 cons (1 . 2) true #t false #f improper-list (1 2 . 3) vector #(1 2 3 4 5) quote 'quote quasiquote (quasiquote quasiquote) unquote (unquote unquote) unquote-splicing (unquote-splicing unquote-splicing))
tort GC stats:
tort_object_alloc_n = 12844
tort_object_alloc_bytes = 466648
tort_malloc_n = 13664
tort_malloc_bytes = 477390
tort_realloc_n = 6490
tort_realloc_bytes = 26101024
tort_malloc_atomic_n = 3483
tort_malloc_atomic_bytes = 46985
tort_realloc_atomic_n = 163
tort_realloc_atomic_bytes = 1133
tort_free_n = 675
tort_free_atomic_n = 0
tort_finalizer_n = 0
tort_finalize_n = 0
bdw_get_heap_size = 860160
bdw_get_free_bytes = 24576
bdw_get_bytes_since_gc = 349232
bdw_get_total_bytes = 1006784
bdw_gc_no = 3
bdw_all_interior_pointers = 1
bdw_finalize_on_demand = 0
bdw_java_finalization = 1
bdw_dont_gc = 0
bdw_dont_expand = 0
bdw_use_entire_heap = 0
bdw_full_freq = 19
bdw_non_gc_bytes = 0
bdw_no_dls = 0
bdw_free_space_divisor = 3
bdw_max_retries = 0
bdw_dont_precollect = 0



DONE
3 changes: 2 additions & 1 deletion tool/filter-output
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ use strict;
my %x = ( );
my $i = 0;
while ( <> ) {
s/(\@0x[0-9a-f]+)/$x{$1} ||= '@x' . (++ $i)/ge;
s/(\@p0x[0-9a-f]+)/$x{$1} ||= '@p0x' . (++ $i)/ge;
s/(\@0x[0-9a-f]+)/$x{$1} ||= '@0x' . (++ $i)/ge;
s/(\@i([1-9][0-9]*))/'@i' . ('#' x length($2))/ge;
s/(\@f(([1-9][0-9]*)(\.[0-9]+)?))/'@f' . ('#' x length($3)) . '.?'/ge;
s/(tort gc stats: .*? = .*?)(\d+)/$1 . ('#' x length($2))/ge;
Expand Down
12 changes: 9 additions & 3 deletions tool/t
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ _dir="$(cd "$_dir" && /bin/pwd)"
progpath="$_dir/$(basename "$0")"
errors=0
tests=0
word_size="$(../core/t/word_size.t)"
action="$1"; shift
for f in "$@"
do
Expand All @@ -12,12 +13,13 @@ do
f_d="$(cd "$f_d" && /bin/pwd)"
f_t_libs="$(dirname "$f_t")/.libs/$(basename "$f_t")"
[ -x "$f_t_libs" ] && f_t="$f_t_libs"
exp="$f.${word_size}.exp"
case "$action"
in
accept)
set -x
cp "$f.out" "$f.exp"
git add `ls $f.{c,exp,in} 2>/dev/null`
cp "$f.out" "$exp"
git add `ls $f.{c,*exp,in} 2>/dev/null`
set +x 2>/dev/null
;;
run|valgrind)
Expand All @@ -31,8 +33,12 @@ do
(TORT_GC=0 valgrind "$f_t" <"$in" || echo $?) 2>&1 | $_dir/filter-output
;;
*)
if [ ! -f "$exp" -a -f "$f.exp" ]
then
cp -p "$f.exp" "$exp"
fi
("$f_t" <$in || echo $?) 2>&1 | $_dir/filter-output > "$f.out"
if ! diff -U 10 "$f.exp" "$f.out" ; then
if ! diff -U 10 "$exp" "$f.out" ; then
echo "========== $f.out ==========" 1>&2
cat $f.out
echo "========== To accept, run: " 1>&2
Expand Down

0 comments on commit 944bc19

Please sign in to comment.