diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-19 17:23:44 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-19 17:23:54 -0700 |
| commit | da33269c307c8a045e548cb1df2a3281a7a0f99e (patch) | |
| tree | 9451b857633b0869b4589a73107056815aa560c7 /tests/object.nom | |
| parent | dcb380f1f6ec67c52364b1246546f1f6b2c168d3 (diff) | |
All tests passing (except object)
Diffstat (limited to 'tests/object.nom')
| -rw-r--r-- | tests/object.nom | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/tests/object.nom b/tests/object.nom index 84524e5..ab87fc7 100644 --- a/tests/object.nom +++ b/tests/object.nom @@ -1,23 +1,24 @@ use "core" use "lib/object2.nom" -immediately: - define object "Dog": - action [bark]: - %barks <- ("Bark!" for all 1 to (@%barks)) - return (%barks joined with " ") - action [get pissed off]: - (@%barks) +<- 1 +#.. + immediately: + define object "Dog": + action [bark]: + %barks <- ("Bark!" for all 1 to (@%barks)) + return (%barks joined with " ") + action [get pissed off]: + (@%barks) +<- 1 -%d <- (new Dog {barks:2}) -as %d: - assume ((@) = %d) - assume ((@%barks) = 2) - assume ((bark) = "Bark! Bark!") - get pissed off - assume ((@%barks) = 3) - assume ((bark) = "Bark! Bark! Bark!") -assume ("\(%d's "class")" = "Dog") -assume ((%d's "barks") = 3) + %d <- (new Dog {barks:2}) + as %d: + assume ((@) = %d) + assume ((@%barks) = 2) + assume ((bark) = "Bark! Bark!") + get pissed off + assume ((@%barks) = 3) + assume ((bark) = "Bark! Bark! Bark!") + assume ("\(%d's "class")" = "Dog") + assume ((%d's "barks") = 3) -say "Object test passed." + say "Object test passed." |
