소스 검색

[cs] fixed test for #6871

Alexander Kuzmenko 7 년 전
부모
커밋
6ddecfe9a4
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  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));
 		}
 	}
 }