From c1ef4fb4797adbdc4fa0456942151fcb24da43a0 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 28 Aug 2008 10:54:34 +0100 Subject: [PATCH] add two test cases: one-instruction-loop.fleet and infinite-nop-is-torpedoable.fleet --- tests/dock/one-instruction-loop.fleet | 20 ++++++++++++++++++++ tests/torpedo/infinite-nop-is-torpedoable.fleet | 14 ++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 tests/dock/one-instruction-loop.fleet create mode 100644 tests/torpedo/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; + -- 1.7.10.4