diff options
| author | Kathy Gray | 2014-01-09 13:33:55 +0000 |
|---|---|---|
| committer | Kathy Gray | 2014-01-09 13:33:55 +0000 |
| commit | 84b6dbb4ae0e5761dfb73e888fb5f71068282ee1 (patch) | |
| tree | 71f0576397c1f19b6cff46e24b6b4cae4f44a77d /src/test | |
| parent | d26d3a8f0f1ae175c710b21f93510cf4f66801a2 (diff) | |
Fixed bug in resuming after an action (which was manifesting as an apparent pattern match bug, which was actually working fine).
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/pattern.sail | 8 | ||||
| -rw-r--r-- | src/test/test1.sail | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/test/pattern.sail b/src/test/pattern.sail index 35a6b632..22f0bcc4 100644 --- a/src/test/pattern.sail +++ b/src/test/pattern.sail @@ -1,5 +1,5 @@ -register nat n +register nat n register nat x register nat y @@ -12,13 +12,13 @@ function unit main _ = { case 0 -> { x := 21; x } case 1 -> { x := 42; x } case x -> { x := 99; x } - }); + }); (* doesn't work - main returns 1 instead of 42 *) - n := 1; + n := 3; switch n { case 0 -> { 21 } case 1 -> { 42 } case x -> { 99 } - } + }; } diff --git a/src/test/test1.sail b/src/test/test1.sail index e10608bb..7747783e 100644 --- a/src/test/test1.sail +++ b/src/test/test1.sail @@ -14,3 +14,4 @@ let bit v = bitzero let ( bit [ 32 ] ) v1 = 0b101 function bit main _ = v1[0] + |
