-
- prln("nop");
- marina.instrIn.fill(new Instruction.Move(DOCK,
- false, /* requeueing */
- Predicate.IgnoreOLC, /* predicate */
- torpedoable, /* torpedoable */
- null, /* path */
- false, /* tokenIn */
- false, /* dataIn */
- false, /* latchData */
- false, /* latchPath */
- false, /* dataOut */
- false /* tokenOut */
- ));
- prln("send data");
- marina.instrIn.fill(SEND_DATA);
-
- // expect nothing to come out, because the NOP is executing
- dataItems = marina.data.drainMany(10);
- fatal(dataItems.size()!=0, "Expected no data item(s) to emerge but got at least: "+dataItems.size()+" data items");
-
- prln("send torpedo");
- marina.instrIn.fill(InstructionStopper.TORPEDO);
-
- int expected = torpedoable?1:0;
- dataItems = marina.data.drainMany(2);
- fatal(dataItems.size()!=expected, "Expected "+expected+" item to emerge but got: "+dataItems.size()+" data items");
- }