Forráskód Böngészése

fix tests related to float infinities (closes #3175)

Simon Krajewski 11 éve
szülő
commit
39a6e446c7
1 módosított fájl, 1 hozzáadás és 2 törlés
  1. 1 2
      tests/unit/UnitBuilder.hx

+ 1 - 2
tests/unit/UnitBuilder.hx

@@ -87,8 +87,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")):
+			case [_, EField( { expr:EConst(CIdent("Math" | "math")) }, "POSITIVE_INFINITY" | "NEGATIVE_INFINITY")] if (Context.defined("cpp") || Context.defined("php")):
 				macro t($e1 == $e2);
 			case [true, _]:
 				macro feq($e1, $e2);