add two test cases: one-instruction-loop.fleet and infinite-nop-is-torpedoable.fleet
authoradam <adam@megacz.com>
Thu, 28 Aug 2008 09:54:34 +0000 (10:54 +0100)
committeradam <adam@megacz.com>
Thu, 28 Aug 2008 09:54:34 +0000 (10:54 +0100)
tests/dock/one-instruction-loop.fleet [new file with mode: 0644]
tests/torpedo/infinite-nop-is-torpedoable.fleet [new file with mode: 0644]

diff --git a/tests/dock/one-instruction-loop.fleet b/tests/dock/one-instruction-loop.fleet
new file mode 100644 (file)
index 0000000..e0da7ce
--- /dev/null
@@ -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 (file)
index 0000000..3717e4e
--- /dev/null
@@ -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;
+