Bladeren bron

use t(v1 == v2) for float infinity comparisons on Php and Cpp

Simon Krajewski 12 jaren geleden
bovenliggende
commit
1f774d4b74
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      tests/unit/UnitBuilder.hx

+ 1 - 1
tests/unit/UnitBuilder.hx

@@ -60,7 +60,7 @@ class UnitBuilder {
 		var e = switch [isFloat(e1) || isFloat(e2), e2.expr] {
 			// hell yeah
 			case [true, EField( { expr:EConst(CIdent("Math")) }, "POSITIVE_INFINITY" | "NEGATIVE_INFINITY")] if (Context.defined("cpp") || Context.defined("php")):
-				macro Math.isFinite($e1);
+				macro t($e1 == $e2);
 			case [true, _]:
 				macro feq($e1, $e2);
 			case _: