add new signal tests
authoradam <adam@megacz.com>
Thu, 21 Aug 2008 10:19:36 +0000 (11:19 +0100)
committeradam <adam@megacz.com>
Thu, 21 Aug 2008 10:19:36 +0000 (11:19 +0100)
tests/flags/basic.test
tests/flags/signal-0-from-inbox-to-inbox.test [new file with mode: 0644]
tests/flags/signal-0-from-inbox-to-outbox.test.test [new file with mode: 0644]
tests/flags/signal-0-from-outbox-to-inbox.test [moved from tests/flags/flags-c.test with 65% similarity]
tests/flags/signal-0-from-outbox-to-outbox.test.test [new file with mode: 0644]
tests/flags/signal-1-from-inbox-to-inbox.test [new file with mode: 0644]
tests/flags/signal-1-from-inbox-to-outbox.test.test [new file with mode: 0644]
tests/flags/signal-1-from-outbox-to-inbox.test [new file with mode: 0644]
tests/flags/signal-1-from-outbox-to-outbox.test.test [new file with mode: 0644]

index ac3542f..461ac1e 100644 (file)
@@ -5,6 +5,7 @@
 #ship debug        : Debug
 
 debug.in:
+  literal 0;
   setflags a=0, b=0;
   deliver;
 
diff --git a/tests/flags/signal-0-from-inbox-to-inbox.test b/tests/flags/signal-0-from-inbox-to-inbox.test
new file mode 100644 (file)
index 0000000..264c364
--- /dev/null
@@ -0,0 +1,17 @@
+// expected output
+#expect 0
+
+#ship debug        : Debug
+#ship fifo         : Fifo
+
+debug.in:
+  literal 2;
+  load repeat counter with 1;
+  recv;
+  setflags a=c, b=b;
+  [a]  literal 1;
+  [!a] literal 0;
+  deliver;
+
+fifo.in:
+  notify debug.in:0;
diff --git a/tests/flags/signal-0-from-inbox-to-outbox.test.test b/tests/flags/signal-0-from-inbox-to-outbox.test.test
new file mode 100644 (file)
index 0000000..dc975a0
--- /dev/null
@@ -0,0 +1,21 @@
+// expected output
+#expect 0
+
+#ship debug        : Debug
+#ship fifo         : Fifo
+#ship fifo2        : Fifo
+
+debug.in:
+  [*] take, deliver;
+
+fifo2.out:
+  literal 2;
+  load repeat counter with 1;
+  wait;
+  setflags a=c, b=b;
+  [a]  literal 1;
+  [!a] literal 0;
+  sendto debug.in;
+
+fifo.in:
+  notify fifo2.out:0;
similarity index 65%
rename from tests/flags/flags-c.test
rename to tests/flags/signal-0-from-outbox-to-inbox.test
index aed8686..b352fc9 100644 (file)
@@ -1,22 +1,17 @@
 // expected output
-#expect 1
 #expect 0
 
 #ship debug        : Debug
 #ship fifo         : Fifo
 
 debug.in:
+  literal 2;
+  load repeat counter with 1;
   recv;
   setflags a=c, b=b;
   [a]  literal 1;
   [!a] literal 0;
-  wait, deliver;
-  setflags a=c, b=b;
-  [a]  literal 1;
-  [!a] literal 0;
   deliver;
 
 fifo.out:
-  notify debug.in:1;
   notify debug.in:0;
-
diff --git a/tests/flags/signal-0-from-outbox-to-outbox.test.test b/tests/flags/signal-0-from-outbox-to-outbox.test.test
new file mode 100644 (file)
index 0000000..e28ecbb
--- /dev/null
@@ -0,0 +1,21 @@
+// expected output
+#expect 0
+
+#ship debug        : Debug
+#ship fifo         : Fifo
+#ship fifo2        : Fifo
+
+debug.in:
+  [*] take, deliver;
+
+fifo2.out:
+  literal 2;
+  load repeat counter with 1;
+  wait;
+  setflags a=c, b=b;
+  [a]  literal 1;
+  [!a] literal 0;
+  sendto debug.in;
+
+fifo.out:
+  notify fifo2.out:0;
diff --git a/tests/flags/signal-1-from-inbox-to-inbox.test b/tests/flags/signal-1-from-inbox-to-inbox.test
new file mode 100644 (file)
index 0000000..acc7b30
--- /dev/null
@@ -0,0 +1,17 @@
+// expected output
+#expect 1
+
+#ship debug        : Debug
+#ship fifo         : Fifo
+
+debug.in:
+  literal 2;
+  load repeat counter with 1;
+  recv;
+  setflags a=c, b=b;
+  [a]  literal 1;
+  [!a] literal 0;
+  deliver;
+
+fifo.in:
+  notify debug.in:1;
diff --git a/tests/flags/signal-1-from-inbox-to-outbox.test.test b/tests/flags/signal-1-from-inbox-to-outbox.test.test
new file mode 100644 (file)
index 0000000..1c91045
--- /dev/null
@@ -0,0 +1,21 @@
+// expected output
+#expect 1
+
+#ship debug        : Debug
+#ship fifo         : Fifo
+#ship fifo2        : Fifo
+
+debug.in:
+  [*] take, deliver;
+
+fifo2.out:
+  literal 2;
+  load repeat counter with 1;
+  wait;
+  setflags a=c, b=b;
+  [a]  literal 1;
+  [!a] literal 0;
+  sendto debug.in;
+
+fifo.in:
+  notify fifo2.out:1;
diff --git a/tests/flags/signal-1-from-outbox-to-inbox.test b/tests/flags/signal-1-from-outbox-to-inbox.test
new file mode 100644 (file)
index 0000000..4adf823
--- /dev/null
@@ -0,0 +1,17 @@
+// expected output
+#expect 1
+
+#ship debug        : Debug
+#ship fifo         : Fifo
+
+debug.in:
+  literal 2;
+  load repeat counter with 1;
+  recv;
+  setflags a=c, b=b;
+  [a]  literal 1;
+  [!a] literal 0;
+  deliver;
+
+fifo.out:
+  notify debug.in:1;
diff --git a/tests/flags/signal-1-from-outbox-to-outbox.test.test b/tests/flags/signal-1-from-outbox-to-outbox.test.test
new file mode 100644 (file)
index 0000000..1ef3599
--- /dev/null
@@ -0,0 +1,21 @@
+// expected output
+#expect 1
+
+#ship debug        : Debug
+#ship fifo         : Fifo
+#ship fifo2        : Fifo
+
+debug.in:
+  [*] take, deliver;
+
+fifo2.out:
+  literal 2;
+  load repeat counter with 1;
+  wait;
+  setflags a=c, b=b;
+  [a]  literal 1;
+  [!a] literal 0;
+  sendto debug.in;
+
+fifo.out:
+  notify fifo2.out:1;