Changeset 4611094f in mainline for uspace/dist/src/sysel/demos/enum.sy
- Timestamp:
- 2011-03-20T19:09:19Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cfbcd86
- Parents:
- 8c76c30 (diff), 7308e84 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/dist/src/sysel/demos/enum.sy
r8c76c30 r4611094f 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.