% $Id: PrintServerTest.oz,v 1.1 2010/04/20 15:06:18 leavens Exp $ \insert 'PrintServer.oz' \insert 'TestingNoStop.oz' declare P = {PrintServer} {StartTesting 'PrintServer'} {Test {Send P queue($)} '==' nil} local Z in {Send P print("A long time ago..." 1 Z)} {Wait Z} end {Test {Send P queue($)} '==' nil} {Send P print("It was the best of times, it was the worst of times..." 2 _)} {Send P print("It was a dark and stormy night..." 3 _)} {Send P cancel(3)} local FourDone in {Send P print("Over the hill and through the woods..." 4 FourDone)} {Assert ({Send P queue($)} \= nil) == {IsDet FourDone}} end {StartTesting done}