[Test] public void test_exceptions()
    {
        bool caught = false;

        try {
            WVEXCEPT(throw_exception());
        } catch (Wv.Test.WvAssertionFailure e) {
            throw e;
        } catch (System.Exception) {
            caught = true;
        }

        WVPASS(caught);

        caught = false;

        System.Console.WriteLine("Ignore next failure: it is expected");
        WvTest.expect_next_failure();
        try {
            WVEXCEPT(no_throw_exception());
        } catch (Wv.Test.WvAssertionFailure) {
            caught = true;
        }

        WVPASS(caught);
    }
示例#2
0
 public static void Main()
 {
     WvTest.DoMain();
 }