( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )
global
4 elements tested current passed failed
3 elements checked ignored io
3 elements total tpassed tfailed

: TEST: getToken keepString !tested 0 [ !passed ] [ !failed ] bi checked ++ ;
: OMIT: getToken "\nNot Tested: %s" puts ignored ++ ;
: IO:   getToken "\nNot Tested (IO): %s" puts io ++ ;

: summary
  @tfailed @tpassed @total
  "\n%d tests run: %d passed, %d failed." puts
  @io @ignored @checked
  "\n%d words checked, %d words unchecked, %d i/o words ignored.\n" puts ;

: check
  repeat
    getToken
    "}" over compare if;
    toNumber <> [ 0 !current ] ifTrue
  again ;

: expected:
  -1 !current do
  getToken drop check drop
  @current [ passed ] [ failed ] if ++ ;

: testedWith:
  getToken drop passed ++ ;

: results
  @failed @passed @tested "\nTested: %s\n  %d passed, %d failed" puts
  @passed @failed + +total
  @failed +tfailed
  @passed +tpassed ;
( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )
TEST: 1+
  [    3 1+ ] expected: { 4 }
  [ 13 2 1+ ] expected: { 3 13 }
  [   -2 1+ ] expected: { -1 }
results

TEST: 1-
  [    3 1- ] expected: { 2 }
  [ 13 2 1- ] expected: { 1 13 }
  [    0 1- ] expected: { -1 }
  [   -1 1- ] expected: { -2 }
results

TEST: swap
  [   3 2 swap ] expected: { 3 2 }
  [ 1 2 3 swap ] expected: { 2 3 1 }
results

TEST: drop
  [   2 1 drop      ] expected: { 2 }
  [ 3 2 1 drop drop ] expected: { 3 }
  [ 1 2 3 4 5 drop depth ] expected: { 4 4 3 2 1 }
results

TEST: and
  [  0  0 and ] expected: {  0 }
  [ -1  0 and ] expected: {  0 }
  [ -1 -1 and ] expected: { -1 }
results

TEST: or
  [  0  0 or ] expected: {  0 }
  [ -1  0 or ] expected: { -1 }
  [ -1 -1 or ] expected: { -1 }
results

TEST: xor
  [  0  0 xor ] expected: {  0 }
  [ -1  0 xor ] expected: { -1 }
  [ -1 -1 xor ] expected: {  0 }
results

TEST: @
  create foo 9 ,
  [ foo @ ] expected: { 9 }
  [ base @ ] expected: { 10 }
results

TEST: !
  create foo 9 ,
  [ foo @ 10 foo ! foo @ ] expected: { 10 9 }
results

TEST: +
  [ 1 2 +     ] expected: { 3 }
  [ 2 3 4 + + ] expected: { 9 }
  [ 1 2 1 9 + ] expected: { 10 2 1 }
results

TEST: -
  [ 2 1 -     ] expected: { 1 }
  [ 2 4 3 - - ] expected: { 1 }
  [ 1 2 1 9 - ] expected: { -8 2 1 }
results

TEST: *
  [  1  2 *      ] expected: { 2 }
  [  2  3 *      ] expected: { 6 }
  [ -1 10 *      ] expected: { -10 }
  [ -1  2 * -1 * ] expected: { 2 }
results

TEST: /mod
  [  5  2 /mod ] expected: {  2  1 }
  [ -5  2 /mod ] expected: { -2 -1 }
  [ -5 -2 /mod ] expected: {  2 -1 }
  [  5 -2 /mod ] expected: { -2  1 }
results

TEST: <<
  binary
  [ 111000111 11 << ] expected: { 111000111000 }
  decimal
results

TEST: >>
  binary
  [ 111000111000 11 >> ] expected: { 111000111 }
  decimal
results

IO: tib

TEST: dup
  [   1 dup ] expected: { 1 1 }
  [ 2 1 dup ] expected: { 1 1 2 }
results

IO: in
IO: out
IO: accept

TEST: here
  [ here heap @ = ] expected: { -1 }
  [ here  1 allot here < ] expected: { -1 }
  [ here -1 allot here > ] expected: { -1 }
results

TEST: ,
  [ here 0 , here swap - ] expected: { 1 }
  [ here 12 , @ ] expected: { 12 }
  here  1 , 2 , 3 ,
  [ @+ swap @+ swap @ ] expected: { 3 2 1 }
results

TEST: create
  create foo
  [ @last d->name "foo" compare ] expected: { -1 }
  [ @last d->name "bar" compare ] expected: {  0 }
  [ @last @d->class &.data = ] expected: { -1 }
  [ @last @d->class &.data <> ] expected: { 0 }
results

TEST: :
  : foo 12 ;
  : bar foo 2 * ;
  [ foo bar ] expected: { 24 12 }
results

TEST: header
  "foo" header
  [ @last d->name "foo" compare ] expected: { -1 }
  [ @last d->name "bar" compare ] expected: {  0 }
results

IO: cr
IO: putc

TEST: remapKeys
  [ 10 remapKeys ] expected: { 10 }
results

IO: <puts>

TEST: over
  [ 3 2 over      ] expected: { 3 2 3 }
  [ 1 2 over over ] expected: { 2 1 2 1 }
  [ 2 3 over      ] expected: { 2 3 2 }
results

TEST: not
  [ -1 not ] expected: { 0 }
  [ -3 not ] expected: { 2 }
  [  0 not ] expected: { -1 }
  [  2 not ] expected: { -3 }
results

TEST: on
  variable foo
  [        foo @ ] expected: { 0 }
  [ foo on foo @ ] expected: { -1 }
results

TEST: off
  -1 variable: foo
  [         foo @ ] expected: { -1 }
  [ foo off foo @ ] expected: { 0 }
results

TEST: /
  [ 5 2 / ] expected: { 2 }
results

TEST: mod
  [ 5 2 mod ] expected: { 1 }
results

TEST: negate
  [ -1 negate ] expected: { 1 }
  [  1 negate ] expected: { -1 }
results

TEST: do
  [ 100 &1+ do ] expected: { 101 }
results

TEST: numbers
  [ numbers  0 + @ ] expected: { 48 }
  [ numbers  1 + @ ] expected: { 49 }
  [ numbers  2 + @ ] expected: { 50 }
  [ numbers  3 + @ ] expected: { 51 }
  [ numbers  4 + @ ] expected: { 52 }
  [ numbers  5 + @ ] expected: { 53 }
  [ numbers  6 + @ ] expected: { 54 }
  [ numbers  7 + @ ] expected: { 55 }
  [ numbers  8 + @ ] expected: { 56 }
  [ numbers  9 + @ ] expected: { 57 }
  [ numbers 10 + @ ] expected: { 65 }
  [ numbers 11 + @ ] expected: { 66 }
  [ numbers 12 + @ ] expected: { 67 }
  [ numbers 13 + @ ] expected: { 68 }
  [ numbers 14 + @ ] expected: { 69 }
  [ numbers 15 + @ ] expected: { 70 }
results

IO: wait

TEST: '
  create foo
  here ' foo &= expected: { -1 }
  21   ' foo &= expected: {  0 }
results

TEST: @+
  create a 1 , 2 , 3 ,
  [ a @+ swap @+ swap @+ swap drop ] expected: { 3 2 1 }
results

TEST: !+
  create a 0 , 0 , 0 ,
  [ 3 2 1 a !+ !+ !+ drop
    a @+ swap @+ swap @+ swap drop ] expected: { 3 2 1 }
results

TEST: keepString
  [ "hello" dup keepString <> ] expected: { -1 }
results

TEST: getLength
  [ "abc" getLength ] expected: { 3 }
results

TEST: withLength
  [ "abc" dup withLength [ = ] dip ] expected: { 3 -1 }
results

TEST: withClass
  testedWith: *implicit*
results

TEST: .word
  testedWith: *implicit*
results

TEST: .macro
  testedWith: *implicit*
results

TEST: .data
  testedWith: *implicit*
results

TEST: d->class
  d' words [ d->class @ &.word = ] expected: { -1 }
results

TEST: d->xt
  d' words [ d->xt @ &words = ] expected: { -1 }
results

TEST: d->name
  d' words [ d->name "words" compare ] expected: { -1 }
results

IO: boot

TEST: toNumber
  [  "123" toNumber ] expected: { 123 }
  [ "-123" toNumber ] expected: { -123 }
results

TEST: isNumber?
  [ "123" isNumber? ] expected: { -1 }
  [ "qaz" isNumber? ] expected: {  0 }
results

IO: ok
IO: listen
IO: putc

TEST: find
  [ &words "words" find [ @d->xt = ] dip ] expected: { -1 -1 }
  [ &words "zzz"   find [ @d->xt = ] dip ] expected: { 0 0 }
results

TEST: notFound
  testedWith: __@
  testedWith: __!
  testedWith: __+
  testedWith: __-
  testedWith: __#
  testedWith: __%
  testedWith: __$
  testedWith: __'
results

TEST: <notFound>
  testedWith: notFound
results

IO: puts

TEST: compare
  [ "abc" "abc" compare ] expected: { -1 }
  [ "abc" "def" compare ] expected: {  0 }
  [ "gobo abc" "gobo abc" compare ] expected: { -1 }
  [ "fooarcabc" "defaf"   compare ] expected: {  0 }
results

IO: redraw

TEST: if
  [ -1 [ 1 ] [ 2 ] if ] expected: { 1 }
  [  0 [ 1 ] [ 2 ] if ] expected: { 2 }
results

TEST: ifTrue
  [ 9  4 [ 1+ ] ifTrue ] expected: { 10 }
  [ 0 -1 [ 1+ ] ifTrue ] expected: { 1 }
  [ 0  0 [ 1+ ] ifTrue ] expected: { 0 }
results

TEST: ifFalse
  [ 9  4 [ 1+ ] ifFalse ] expected: { 9 }
  [ 0 -1 [ 1+ ] ifFalse ] expected: { 0 }
  [ 0  0 [ 1+ ] ifFalse ] expected: { 1 }
results

TEST: dip
  [ 1 2 [ 3 ] dip ] expected: { 2 3 1 }
results

TEST: sip
  [ 1 2 [ 3 ] sip ] expected: { 2 3 2 1 }
results

TEST: =
  [ 1 2 = ] expected: { 0 }
  [ 2 1 = ] expected: { 0 }
  [ 1 1 = ] expected: { -1 }
  [ 2 2 = ] expected: { -1 }
  [ 31 121 121 = ] expected: { -1 31 }
results

TEST: <>
  [ 1 2 <> ] expected: { -1 }
  [ 2 1 <> ] expected: { -1 }
  [ 1 1 <> ] expected: { 0 }
  [ 2 2 <> ] expected: { 0 }
  [ 31 121 121 <> ] expected: { 0 31 }
results

TEST: <
  [ 1 2 < ] expected: { -1 }
  [ 1 1 < ] expected: {  0 }
  [ 2 1 < ] expected: {  0 }
results

TEST: >
  [ 1 2 > ] expected: {  0 }
  [ 1 1 > ] expected: {  0 }
  [ 2 1 > ] expected: { -1 }
results

TEST: >=
  [ 1 2 >= ] expected: {  0 }
  [ 1 1 >= ] expected: { -1 }
  [ 2 1 >= ] expected: { -1 }
results

TEST: <=
  [ 1 2 <= ] expected: { -1 }
  [ 1 1 <= ] expected: { -1 }
  [ 2 1 <= ] expected: {  0 }
results

TEST: ;
  testedWith: *implicit*
results

TEST: ;;
  testedWith: ;
results

TEST: repeat
  [ 1 10 repeat 1- 0; again ] expected: { 1 }
results

TEST: again
  testedWith: repeat
results

TEST: 0;
  testedWith: 0;
results

TEST: push
  [ 100 push 200 300 pop ] expected: { 100 300 200 }
results

TEST: pop
  testedWith: push
results

TEST: (
  [ 1 ( 2 ) 3 ] expected: { 3 1 }
results

TEST: [
  testedWith: --implicit--
results

TEST: ]
  testedWith: --implicit--
results

TEST: last
  [ last @ [ 100 last ! 10 last @ ] dip last ! ] expected: { 100 10 }
results

TEST: compiler
  [ compiler @ [ 100 compiler ! 10 compiler @ ] dip compiler ! ] expected: { 100 10 }
results

TEST: fb
  [ fb @ [ 100 fb ! 10 fb @ ] dip fb ! ] expected: { 100 10 }
results

TEST: fw
  [ fw @ [ 100 fw ! 10 fw @ ] dip fw ! ] expected: { 100 10 }
results

TEST: fh
  [ fh @ [ 100 fh ! 10 fh @ ] dip fh ! ] expected: { 100 10 }
results

TEST: memory
  [ memory @ [ 100 memory ! 10 memory @ ] dip memory ! ] expected: { 100 10 }
results

TEST: cw
  [ cw @ [ 100 cw ! 10 cw @ ] dip cw ! ] expected: { 100 10 }
results

TEST: ch
  [ ch @ [ 100 ch ! 10 ch @ ] dip ch ! ] expected: { 100 10 }
results

TEST: heap
  testedWith: here
results

TEST: which
  [ "words" find drop @which = ] expected: { -1 }
  [ "puts"  find drop @which = ] expected: { -1 }
  [ "cr"    find drop @which = ] expected: { -1 }
results

IO: remapping

TEST: eatLeading?
  ( This is an IO word, but is used by ", so we can test it fairly easily )
  create bl 32 , 0 ,
  [ " " bl compare ] expected: { -1 }
results

TEST: base
  testedWith: decimal
  testedWith: hex
  testedWith: binary
  testedWith: octal
  testedWith: __#
  testedWith: __#
  testedWith: __%
results

IO: update

TEST: version
  [ version @ version 1+ @ ] expected: { 49 49 }
results

TEST: build
  [ build @ toNumber time < ] expected: { -1 }
results

IO: tabAsWhitespace

TEST: nip
  [ 1 2 3 nip ] expected: { 3 1 }
results

TEST: rot
  [ 1 2 3 rot rot rot ] expected: { 3 2 1 }
results

TEST: tuck
  [ 1 2 3 tuck ] expected: { 3 2 3 1 }
results

TEST: +!
  10 variable: foo
  [ @foo 20 foo +! @foo ] expected: { 30 10 }
results

TEST: -!
  10 variable: foo
  [ @foo 5 foo -! @foo ] expected: { 5 10 }
results

TEST: ++
  variable foo
  [        foo @ ] expected: { 0 }
  [ foo ++ foo @ ] expected: { 1 }
  [ foo ++ foo @ ] expected: { 2 }
  [ foo ++ foo @ ] expected: { 3 }
  [ foo ++ foo @ ] expected: { 4 }
results

TEST: --
  4 variable: foo
  [        foo @ ] expected: { 4 }
  [ foo -- foo @ ] expected: { 3 }
  [ foo -- foo @ ] expected: { 2 }
  [ foo -- foo @ ] expected: { 1 }
  [ foo -- foo @ ] expected: { 0 }
results

TEST: {{
  : a 1 ;
  : b 3 ;
  {{
    : a 2 ;
  ---reveal---
    : b a ;
  }}
  [ a b ] expected: { 2 1 }
results

TEST: ---reveal---
  testedWith: {{
results

TEST: }}
  testedWith: {{
results

TEST: :devector
  : a 12 ;
  : b 32 ;
  : c a a + ;
  [ c ] expected: { 24 }
  [ &b &a :is c ] expected: { 64 }
  [ &a :devector c ] expected: { 24 }
  &b is a
  [ c ] expected: { 64 }
  devector a
  [ c ] expected: { 24 }
  : c default: a default: a + ;
  &b is a
  [ c ] expected: { 24 }
results

TEST: :is
  testedWith: :devector
results

TEST: devector
  testedWith: :devector
results

TEST: is
  testedWith: :devector
results

TEST: default:
  testedWith: :devector
results


TEST: d'
  create ooo
  d' ooo last @ &= expected: { -1 }
results

TEST: xt->d
  d' words [ &words xt->d = ] expected: { -1 }
results

TEST: hide
  create foo
  last @
  create bar
  create boo
  hide bar
  [ last @ @ = ] expected: { -1 }
  create zoo
  last @
  hide zoo
  [ last @ @ = ] expected: { 0 }
results

TEST: __&
  ' words &words [ = ] expected: { -1 }
results

TEST: __@
  decimal
  [ @base ] expected: { 10 }
results

TEST: __!
  variable foo
  [ @foo 10 !foo @foo ] expected: { 10 0 }
results

TEST: __+
  10 variable: foo
  [ @foo 20 +foo @foo ] expected: { 30 10 }
results

TEST: __-
  10 variable: foo
  [ @foo 5 -foo @foo ] expected: { 5 10 }
results

TEST: __2
  [   1 2 3 4 2drop ] expected: { 2 1 }
  [ 0 1 2 3 4 2drop ] expected: { 2 1 0 }
  [     1 2 3 2over ] expected: { 3 2 3 2 1 }
  [   1 2 3 4 2over ] expected: { 4 3 4 3 2 1 }
results

TEST: .primitive
  testedWith: *implicit*
results

TEST: .compiler
  testedWith: *implicit*
results

TEST: reclass
  testedWith: *implicit*
results

TEST: reclass:
  testedWith: *implicit*
results

TEST: immediate
  testedWith: *implicit*
results

TEST: compile-only
  testedWith: *implicit*
results

TEST: `
  testedWith: *implicit*
results

TEST: jump:
  : foo 12 ;
  [ 3 4 jump: foo 5 6 ] expected: { 12 4 3 }
results

TEST: [[
  [ 1 [[ 1 , 2 , ]] ] expected: { 2 1 }
results

TEST: ]]
  testedWith: [[
results

TEST: []
  [] expected: { }
results

TEST: while
  [ 1 2 3 4 5 [ 3 <> ] while ] expected: { 2 1 }
results

TEST: curry
  [ 5 [ 6 ] curry do ] expected: { 6 5 }
results

TEST: take
  [ 5 [ 6 ] take do ] expected: { 5 6 }
results

TEST: bi
  [ 10 &1+ &1- bi ] expected: { 9 11 }
results

TEST: bi*
  [ 1 2 [ 1+ ] [ 1- ] bi* ] expected: { 1 2 }
results

TEST: bi@
  [ 1 2 [ 1+ ] bi@ ] expected: { 3 2 }
results

TEST: tri
  [ 10 &1+ &1- &negate tri ] expected: { -10 9 11 }
results

TEST: tri*
  [ 1 2 3 &1+ &1- &1+ tri* ] expected: { 4 1 2 }
results

TEST: tri@
  [ 1 2 3 &1+ tri@ ] expected: { 4 3 2 }
results

TEST: cons
  [ 2 3 cons do ] expected: { 3 2 }
results

TEST: preserve
  [ base [ 19 !base ] preserve @base ] expected: { 10 }
  [ @heap heap [ 1000 allot ] preserve @heap = ] expected: { -1 }
results

TEST: when
  : try ( n- )
    [ 1 = ] [ drop 100 ] when
    [ 2 = ] [ drop 200 ] when
    [ 3 = ] [ drop 300 ] when
    drop 400 ;
  [  0 try ] expected: { 400 }
  [  1 try ] expected: { 100 }
  [  2 try ] expected: { 200 }
  [  3 try ] expected: { 300 }
  [  4 try ] expected: { 400 }
  [ 91 try ] expected: { 400 }
results

TEST: whend
  : try ( n- )
    [ 1 = ] [ 100 ] whend
    [ 2 = ] [ 200 ] whend
    [ 3 = ] [ 300 ] whend
    drop 400 ;
  [  0 try ] expected: { 400 }
  [  1 try ] expected: { 100 }
  [  2 try ] expected: { 200 }
  [  3 try ] expected: { 300 }
  [  4 try ] expected: { 400 }
  [ 91 try ] expected: { 400 }
results

TEST: times
  [ 3 [ 1 ] times ] expected: { 1 1 1 }
  [ 2 -5 [ 1 ] times ] expected: { 2 }
  [ 2  0 [ 1 ] times ] expected: { 2 }
results

TEST: iterd
  [ 3 [] iterd ] expected: { 1 2 3 }
  [ 2 -5 [] iterd ] expected: { 2 }
  [ 2  0 [] iterd ] expected: { 2 }
results

TEST: iter
  [ 3 [] iter ] expected: { 2 1 0 }
  [ 2 -5 [] iter ] expected: { 2 }
  [ 2  0 [] iter ] expected: { 2 }
results

TEST: <each@>
  testedWith: each@
results

TEST: each@
  create array
    5 , ( #entries )
    1 , 2 , 3 , 4 , 5 , 0 ,
  [ array [ @ ] ^types'ARRAY each@ ] expected: { 5 4 3 2 1 }
  [ array 1+ [ @ ] ^types'STRING each@ ] expected: { 5 4 3 2 1 }
  [ array 1+ 3 [ @ ] ^types'BUFFER each@ ] expected: { 3 2 1 }
  create a
    0 , 1 ,
  create b
    &a , 2 ,
  create c
    &b , 3 ,
  create d
    &c , 4 ,
  d variable: list
  [ list [ 1+ @ ] ^types'LIST each@ ] expected: { 1 2 3 4 }
results

TEST: copy
  testedWith: tempString
results

TEST: fill
  create z 100 allot
  [ z 1 20 fill z @ ] expected: { 1 }
results

TEST: ahead
  : bar 14 ;
  : z ahead ; immediate
  : foo z 12 ;
  &bar swap !
  [ foo ] expected: { 14 }
results

TEST: if;
  [ 0 1 1 = if;   ] expected: { 0 }
  [ 0 1 2 = if; 3 ] expected: { 3 0 }
results

TEST: within
  [ 12 1 100 within ] expected: { -1 }
  [  1 1 100 within ] expected: { -1 }
  [  0 1 100 within ] expected: {  0 }
  [ 98 1 100 within ] expected: { -1 }
results

TEST: variable:
  testedWith: +!
  testedWith: -!
results

TEST: variable
  testedWith: @
  testedWith: !
results

TEST: constant
  10 constant foo
  [ foo ] expected: { 10 }
results

TEST: string
  "Hello" string HELLO
  "World" string WORLD
  [ HELLO WORLD compare ] expected: { 0 }
  [ HELLO HELLO compare ] expected: { -1 }
results

TEST: allot
  [ here 100 allot here swap 100 + = ] expected: { -1 }
  [ here 100 allot -100 allot here = ] expected: { -1 }
results

TEST: elements
  4 elements a b c d
  [ &a 1+ &b = ] expected: { -1 }
  [ 10 !a @a !d @d ] expected: { 10 }
  [ a 3 + @ ] expected: { 10 }
results

TEST: decimal
  decimal [ 10 ] hex expected: { A } decimal
results

TEST: hex
  hex [ A ] decimal expected: { 10 }
results

TEST: octal
  octal [ 71 ] decimal expected: { 57 }
results

TEST: binary
  testedWith: >>
  testedWith: <<
results

TEST: toString
  [  123 toString "123" compare ] expected: { -1 }
  [ 3123 toString "123" compare ] expected: {  0 }
results

IO: clear
IO: space
IO: putn

TEST: .parse
  testedWith: __$
  testedWith: __#
  testedWith: __'
  testedWith: __%
  testedWith: __"
results

TEST: parsing
  testedWith: __$
  testedWith: __#
  testedWith: __'
  testedWith: __%
  testedWith: __"
results

TEST: __$
  [ $A ] expected: { 10 }
results

TEST: __#
  hex
  [ #10 ] expected: { A }
  decimal
results

TEST: __\%
  [ %101 ] expected: { 5 }
results

TEST: __'
  [ 'a ] expected: { 97 }
results

TEST: dicts
  [ @dicts ] expected: { 0 }
  [ &strings' :with @dicts ] expected: { 1 }
  [ &buffer'  :with @dicts ] expected: { 2 }
  [ without @dicts ] expected: { 1 }
  [ &buffer'  :with @dicts ] expected: { 2 }
  [ global @dicts ] expected: { 0 }
  with buffer'
  [ @dicts ] expected: { 1 }
  global with| strings' files' |
  [ @dicts ] expected: { 2 }
  global
results

TEST: %%
  testedWith: chain:
results

TEST: <%>
  testedWith: chain:
results

TEST: .chain
  testedWith: chain:
results

TEST: chain:
  chain: foo'
    21 variable: a
    : foo.b a @ putn ;
  ;chain

  [ "foo.b"   &foo' findInChain nip ] expected: { -1 }
  [ "foobar2" &foo' findInChain nip ] expected: {  0 }

   50 variable: a
  100 variable: a
  200 variable: b
  [ &a &foo' .chain "a" find drop d->xt %% = ] expected: { 0 }
  [ ^foo'a @ ] expected: { 21 }
results

TEST: ;chain
  testedWith: chain:
results

TEST: :with
  testedWith: dicts
results

TEST: with
  testedWith: dicts
results

TEST: without
  testedWith: dicts
results

TEST: global
  testedWith: dicts
results

TEST: findInChain
  testedWith: chain:
results

TEST: with|
  testedWith: dicts
results

TEST: rename:
  create bar 300 ,
  create foo 200 ,
  create foo 100 ,
  [ @bar @foo ] expected: { 100 300 }
  &foo rename: bar
  [ @bar @foo ] expected: { 200 100 }
results

TEST: tempString
  [ "100" dup tempString over over < [ compare ] dip and ] expected: { -1 }
results

TEST: __"
  [ " hello" @ 32 = ] expected: { -1 }
  [ " hello" getLength ] expected: { 6 }
results

TEST: "
  [ "hello" @ 'h = ] expected: { -1 }
  [ "hello" getLength ] expected: { 5 }
results

IO: formatted

TEST: depth
  [ 1 2 depth ] expected: { 2 2 1 }
  [ depth ] expected: { 0 }
  [ 1 depth ] expected: { 1 1 }
results

TEST: reset
  [ 1 2 3 reset depth ] expected: { 0 }
results

IO: .s
IO: words
IO: save
IO: bye
IO: getToken
IO: getNumber
IO: :include
IO: include
IO: time
IO: delay
IO: getEnv

TEST: later
  : a 1 later 2 ;
  : b 3 a 4 ;
  [ b ] expected: { 2 4 1 3 }
results

TEST: doc{
  : a 100 ;
doc{ : a 200 ; }doc
  [ a ] expected: { 100 }
results

TEST: __^
  testedWith: chain:
results

IO: needs

TEST: variables|
  variables| a b c d |
  100 !a
  200 !b
  300 !c
  400 !d
  [ @a @b @c @d ] expected: { 400 300 200 100 }
results

TEST: pow
  [ 2 3 pow ] expected: { 8 }
  [ 3 2 pow ] expected: { 9 }
results

TEST: abs
  [ -1 abs ] expected: { 1 }
  [  1 abs ] expected: { 1 }
results

TEST: min
  [  1 10 min ] expected: { 1 }
  [ 91 10 min ] expected: { 10 }
results

TEST: max
  [  1 10 max ] expected: { 10 }
  [ 91 10 max ] expected: { 91 }
results

TEST: random
  [ random random = ] expected: { 0 }
results

summary
bye
