Browse Source

[cs] fixed test for #6871

Alexander Kuzmenko 7 years ago
parent
commit
6ddecfe9a4
1 changed files with 6 additions and 2 deletions
  1. 6 2
      tests/unit/src/unit/issues/Issue6871.hx

+ 6 - 2
tests/unit/src/unit/issues/Issue6871.hx

@@ -9,18 +9,22 @@ class Issue6871 extends unit.Test {
 	static function set_field(v:Int):Int throw SETTER_ERROR;
 
 	function test() {
+		inline function exception(e:Dynamic) {
+			return #if cs e.InnerException.Message #else e #end;
+		}
+
 		try {
 			Reflect.getProperty(Issue6871, 'field');
 			t(false);
 		} catch(e:Dynamic) {
-			eq(GETTER_ERROR, e);
+			eq(GETTER_ERROR, exception(e));
 		}
 
 		try {
 			Reflect.setProperty(Issue6871, 'field', 123);
 			t(false);
 		} catch(e:Dynamic) {
-			eq(SETTER_ERROR, e);
+			eq(SETTER_ERROR, exception(e));
 		}
 	}
 }