DIRECTORY BitOps, IO, ViewerIO; TestBitOps: CEDAR PROGRAM IMPORTS BitOps, IO, ViewerIO = BEGIN SimpleTest: PROC = TRUSTED BEGIN OPEN BitOps, IO; out: IO.STREAM _ ViewerIO.CreateViewerStreams["TestBitOps"].out; b: BOOL; c: CARDINAL; at: ARRAY [0..4) OF CARDINAL; a: BitMWord _ DESCRIPTOR[at]; FOR i:CARDINAL IN [0..4) DO at[i] _ 125252B; ENDLOOP; IF NOT (b _ EBFW[6,1,4]) THEN out.PutF["First EBFW failed with %b when expecting TRUE ", bool[b]]; IF (c _ IBIW[TRUE,6,3,4]) # 7B THEN out.PutF["First IBIW failed with %b when expecting 7 ", card[c]]; IF NOT (b _ EBFM[a,62,64]) THEN out.PutF["First EBFM failed with %b when expecting TRUE ", bool[b]]; IBIM[FALSE,a,62,64]; IF a[3] # 125250B THEN out.PutF["First IBIM failed with %b when expecting 125250B ", card[a[3]]]; IF (c _ ECFW[1,4,12,16]) # 1 THEN out.PutF["ECFW failed with %b when expecting 1 ", card[c]]; IF (c _ ICIW[1,1,0,1,16]) # 100001B THEN out.PutF["ICIW failed with %b when expecting 100001B ", card[c]]; IF (c _ ECFM[a,58,6,64]) # 50B THEN out.PutF["ECFM failed with %b when expecting 50B ", card[c]]; ICIM[1,a,62,1,64]; IF a[3] # 125252B THEN out.PutF["ICIM failed with %b when expecting 125252B ", card[a[3]]]; out.PutF["Done."]; out.Flush[]; END; SimpleTest[]; END. ¦TestBitOps.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Barth, August 6, 1986 6:16:09 pm PDT Spreitzer, September 17, 1985 1:27:02 pm PDT ΚΫ˜codešœ™Kšœ Οmœ1™˜aKšžœ˜KšžœžœE˜[K˜K˜K˜ Kšžœ˜—K˜K˜ K˜Kšžœ˜—…—ά]