소스 검색

Add test for modulo zero. Closes #7043

hughsando 7 년 전
부모
커밋
bfe1db55e8
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      tests/unit/src/unitstd/Math.unit.hx

+ 5 - 0
tests/unit/src/unitstd/Math.unit.hx

@@ -56,6 +56,11 @@ Math.isNaN(Math.POSITIVE_INFINITY / Math.NaN) == true;
 Math.isNaN(Math.NaN / Math.POSITIVE_INFINITY) == true;
 Math.isNaN(Math.NEGATIVE_INFINITY / Math.NaN) == true;
 
+// %
+var izero = 0;
+try {
+   Math.isNaN(1%izero) == true;
+} catch (e:Dynamic) { }
 // abs
 Math.abs(-1.223) == 1.223;
 Math.abs(1.223) == 1.223;