[vala/staging: 13/14] Test error type check



commit 09aba1e9dc8e121e79bd205fb16bd11821126dba
Author: Jürg Billeter <j bitron ch>
Date:   Sun Aug 24 12:49:16 2014 +0200

    Test error type check

 tests/errors/errors.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tests/errors/errors.vala b/tests/errors/errors.vala
index d56f3f2..264e637 100644
--- a/tests/errors/errors.vala
+++ b/tests/errors/errors.vala
@@ -58,7 +58,9 @@ class Maman.Bar : Object {
                try {
                        throw new BarError.FOO ("error message");
                } catch (Error e) {
-                       return;
+                       if (e is BarError && e is BarError.FOO) {
+                               return;
+                       }
                }
 
                assert_not_reached ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]