% $Id: NewPrintServerTest.oz,v 1.2 2012/04/17 21:28:48 leavens Exp leavens $ \insert 'NewPrintServer.oz' \insert 'TestingNoStop.oz' {StartTesting 'NewPrintServer $Revision: 1.2 $'} local MyPrinterServer = {NewPrintServer} in {Test {Send MyPrinterServer status(3 $)} '==' notFound} local HI in {Send MyPrinterServer send("hi" HI)} {Test HI '==' 0} {Test {Send MyPrinterServer status(HI $)} '==' queued} {Test {Send MyPrinterServer nextToPrint($)} '==' "hi"} {Test {Send MyPrinterServer status(HI $)} '==' notFound} end local HELLO in {Send MyPrinterServer send("hello" HELLO)} {Test HELLO '==' 1} {Test {Send MyPrinterServer status(HELLO $)} '==' queued} {Send MyPrinterServer cancel(HELLO)} {Test {Send MyPrinterServer status(HELLO $)} '==' notFound} end {Test {Send MyPrinterServer status(3 $)} '==' notFound} end {DoneTesting}