Fixes for compiling mPhoto:
[mono.git] / mcs / tests / test-141.cs
1 using System;
2
3 class X {
4         public static int Main()
5         {
6                 byte num1 = 105;
7                 byte num2 = 150;
8                 byte sum;
9
10                 bool ok = false;
11                 
12                 // should generate OverflowException
13                 try {
14                         checked {
15                                 sum = (byte) (num1 - num2);
16                         }
17                 } catch (OverflowException){
18                         ok = true;
19                 }
20
21                 if (ok)
22                         return 0;
23                 return 1;
24         }
25 }