diff options
Diffstat (limited to 'test/commit.tcl')
| -rw-r--r-- | test/commit.tcl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/commit.tcl b/test/commit.tcl index c1328c12..b54d202b 100644 --- a/test/commit.tcl +++ b/test/commit.tcl @@ -6,12 +6,12 @@ proc assert condition { } Assert programBall has program code { - Commit { Claim there is a ball at x 100 y 100 } + Commit { Claim $this has a ball at x 100 y 100 } - When there is a ball at x /x/ y /y/ { + When $this has a ball at x /x/ y /y/ { puts "ball at $x $y" After 10 milliseconds { - Commit { Claim there is a ball at x $x y [expr {$y+1}] } + Commit { Claim $this has a ball at x $x y [expr {$y+1}] } if {$y > 115} { set ::done true } } } @@ -22,20 +22,20 @@ vwait ::done Retract programBall has program code /something/ Assert programUpdate has program code { - Commit { Claim there have been 0 boops } + Commit { Claim $this has seen 0 boops } - Every time there is a boop & there have been /n/ boops { - Commit { Claim there have been [expr {$n + 1}] boops } + Every time there is a boop & $this has seen /n/ boops { + Commit { Claim $this has seen [expr {$n + 1}] boops } } } Assert there is a boop Step -assert {[dict get [lindex [Statements::findMatches [list /someone/ claims there have been /n/ boops]] 0] n] eq 1} +assert {[dict get [lindex [Statements::findMatches [list /someone/ claims /thing/ has seen /n/ boops]] 0] n] eq 1} Retract there is a boop Assert there is a boop Step -assert {[dict get [lindex [Statements::findMatches [list /someone/ claims there have been /n/ boops]] 0] n] eq 2} +assert {[dict get [lindex [Statements::findMatches [list /someone/ claims /thing/ has seen /n/ boops]] 0] n] eq 2} |
