From: adam Date: Thu, 28 Aug 2008 09:54:34 +0000 (+0100) Subject: add two test cases: one-instruction-loop.fleet and infinite-nop-is-torpedoable.fleet X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c1ef4fb4797adbdc4fa0456942151fcb24da43a0;p=fleet.git add two test cases: one-instruction-loop.fleet and infinite-nop-is-torpedoable.fleet --- diff --git a/tests/dock/one-instruction-loop.fleet b/tests/dock/one-instruction-loop.fleet new file mode 100644 index 0000000..e0da7ce --- /dev/null +++ b/tests/dock/one-instruction-loop.fleet @@ -0,0 +1,20 @@ + +// This test case ensures that a single-instruction loop works +// properly. The two instructions after the tail will get "clogged" +// in the switch fabric until the hatch opens, but that's okay. + +#ship debug : Debug +#ship fifo : Fifo + +#expect 5 +#expect 4 + +debug.in: + set word=5; + deliver; + set olc=1; + [Rq] set olc--; + tail; + [*] set word=4; + [*] deliver; + diff --git a/tests/torpedo/infinite-nop-is-torpedoable.fleet b/tests/torpedo/infinite-nop-is-torpedoable.fleet new file mode 100644 index 0000000..3717e4e --- /dev/null +++ b/tests/torpedo/infinite-nop-is-torpedoable.fleet @@ -0,0 +1,14 @@ +#skip +#expect 20 +#ship debug : Debug +#ship fifo : Fifo + +debug.in: + set ilc=*; + [T] nop; + literal 5; + deliver; + +fifo.out: + send token to debug.in:i; +