-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1420 from demergent-labs/property_tests_nan_error
add test support for NaNs and infinities
- Loading branch information
Showing
5 changed files
with
162 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
service: () -> { | ||
getBool: () -> (bool) query; | ||
getEmpty: () -> (empty) query; | ||
getFloat32: () -> (float32) query; | ||
getFloat64: () -> (float64) query; | ||
getInt: () -> (int) query; | ||
getInt16: () -> (int16) query; | ||
getInt32: () -> (int32) query; | ||
getInt64: () -> (int64) query; | ||
getInt8: () -> (int8) query; | ||
getNat: () -> (nat) query; | ||
getNat16: () -> (nat16) query; | ||
getNat32: () -> (nat32) query; | ||
getNat64: () -> (nat64) query; | ||
getNat8: () -> (nat8) query; | ||
getNull: () -> (null) query; | ||
getNumber: () -> (float64) query; | ||
getPrincipal: () -> (principal) query; | ||
getReserved: () -> (reserved) query; | ||
getString: () -> (text) query; | ||
printString: (text) -> (text) query; | ||
getText: () -> (text) query; | ||
printText: (text) -> (text) query; | ||
getNumber: () -> (float64) query; | ||
printNumber: (float64) -> (float64) query; | ||
getInt: () -> (int) query; | ||
printBool: (bool) -> (bool) query; | ||
printEmpty: (empty) -> (empty) query; | ||
printFloat32: (float32) -> (float32) query; | ||
printFloat64: (float64) -> (float64) query; | ||
printInt: (int) -> (int) query; | ||
getInt64: () -> (int64) query; | ||
printInt64: (int64) -> (int64) query; | ||
getInt32: () -> (int32) query; | ||
printInt32: (int32) -> (int32) query; | ||
getInt16: () -> (int16) query; | ||
printInt16: (int16) -> (int16) query; | ||
getInt8: () -> (int8) query; | ||
printInt32: (int32) -> (int32) query; | ||
printInt64: (int64) -> (int64) query; | ||
printInt8: (int8) -> (int8) query; | ||
getNat: () -> (nat) query; | ||
printNat: (nat) -> (nat) query; | ||
getNat64: () -> (nat64) query; | ||
printNat64: (nat64) -> (nat64) query; | ||
getNat32: () -> (nat32) query; | ||
printNat32: (nat32) -> (nat32) query; | ||
getNat16: () -> (nat16) query; | ||
printNat16: (nat16) -> (nat16) query; | ||
getNat8: () -> (nat8) query; | ||
printNat32: (nat32) -> (nat32) query; | ||
printNat64: (nat64) -> (nat64) query; | ||
printNat8: (nat8) -> (nat8) query; | ||
getFloat64: () -> (float64) query; | ||
printFloat64: (float64) -> (float64) query; | ||
getFloat32: () -> (float32) query; | ||
printFloat32: (float32) -> (float32) query; | ||
getBool: () -> (bool) query; | ||
printBool: (bool) -> (bool) query; | ||
getPrincipal: () -> (principal) query; | ||
printPrincipal: (principal) -> (principal) query; | ||
getNull: () -> (null) query; | ||
printNull: (null) -> (null) query; | ||
getReserved: () -> (reserved) query; | ||
printNumber: (float64) -> (float64) query; | ||
printPrincipal: (principal) -> (principal) query; | ||
printReserved: (reserved) -> (reserved) query; | ||
getEmpty: () -> (empty) query; | ||
printEmpty: (empty) -> (empty) query; | ||
printString: (text) -> (text) query; | ||
printText: (text) -> (text) query; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export function areFloatsEqual(paramName: string, paramValue: number) { | ||
if (Number.isNaN(paramValue)) { | ||
return `(Number.isNaN(${paramName}) && Number.isNaN(${paramValue}))`; | ||
} else { | ||
return `${paramName} === ${paramValue}`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters