Changes in uspace/dist/src/sysel/demos/enum.sy [c5cb943d:051b3db8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/dist/src/sysel/demos/enum.sy
rc5cb943d r051b3db8 31 31 var color : ChessColor; 32 32 33 Builtin.WriteLine("Set color to ChessColor.Black.");33 Console.WriteLine("Set color to ChessColor.Black."); 34 34 color = ChessColor.Black; 35 35 36 Builtin.Write("Test color == ChessColor.Black.. ");36 Console.Write("Test color == ChessColor.Black.. "); 37 37 if color == ChessColor.Black then 38 Builtin.WriteLine("True - OK");38 Console.WriteLine("True - OK"); 39 39 else 40 Builtin.WriteLine("False - Fail!");40 Console.WriteLine("False - Fail!"); 41 41 raise new Error.Base(); 42 42 end 43 43 44 Builtin.Write("Test color != ChessColor.Black.. ");44 Console.Write("Test color != ChessColor.Black.. "); 45 45 if color != ChessColor.Black then 46 Builtin.WriteLine("True - Fail!");46 Console.WriteLine("True - Fail!"); 47 47 raise new Error.Base(); 48 48 else 49 Builtin.WriteLine("False - OK");49 Console.WriteLine("False - OK"); 50 50 end 51 51 52 Builtin.Write("Test color == ChessColor.White.. ");52 Console.Write("Test color == ChessColor.White.. "); 53 53 if color == ChessColor.White then 54 Builtin.WriteLine("True - Fail!");54 Console.WriteLine("True - Fail!"); 55 55 raise new Error.Base(); 56 56 else 57 Builtin.WriteLine("False - OK");57 Console.WriteLine("False - OK"); 58 58 end 59 59 60 Builtin.Write("Test color != ChessColor.White.. ");60 Console.Write("Test color != ChessColor.White.. "); 61 61 if color != ChessColor.White then 62 Builtin.WriteLine("True - OK");62 Console.WriteLine("True - OK"); 63 63 else 64 Builtin.WriteLine("False - Fail!");64 Console.WriteLine("False - Fail!"); 65 65 raise new Error.Base(); 66 66 end 67 67 68 Builtin.WriteLine("Success");68 Console.WriteLine("Success"); 69 69 70 70 -- Test enum declared in non-CSI scope
Note:
See TracChangeset
for help on using the changeset viewer.