move one of the memory tests into Memory.ship
[fleet.git] / ships / Memory.ship
index fc54823..b330ecb 100644 (file)
@@ -295,6 +295,33 @@ endmodule
 
 
 
+== Test ==============================================================
+// expected output
+#expect 12
+#expect 13
+#expect 14
+
+// ships required in order to run this code
+#ship debug          : Debug
+#ship memory         : Memory
+
+// instructions not in any codebag are part of the "root codebag"
+// which is dispatched when the code is loaded
+
+BOB:              sendto memory.inCBD;
+memory.inCBD:     [*] take, deliver;
+debug.in:         [*] take, deliver;
+
+
+// This codebag illustrates how to do a loop.  Notice that this
+// is actually an uncontrolled data emitter -- it could clog the
+//  switch fabric!
+
+BOB: {
+  12:           sendto debug.in;
+  13:           sendto debug.in;
+  14:           sendto debug.in;
+}
 
 
 == Constants ========================================================