diff options
author | Corentin Le Gall <corentinlgs@gmail.com> | 2018-07-19 15:57:30 +0200 |
---|---|---|
committer | Corentin Le Gall <corentinlgs@gmail.com> | 2018-07-24 14:42:12 +0200 |
commit | c96df58a88b60c7501b3c8a758c0277c17088371 (patch) | |
tree | 1e982c565a4fd0ba65a382cc1cba97efe891c34b /docs/WriteYourTests/Reference/LuaUnitAssertionFunctions/2_ScientificAssertions.md | |
parent | 55673d50338f041763e6e38f38ea3fc311f2bdc1 (diff) |
Changed doc to GitBook format + added doc
-Changed README.md to a complet GitBook doc.
-Added explanations about EvtGrpReceived functions.
-Corrected mistakes + reduced lines length.
Change-Id: I1a077ddf6acb520a9158de658d3c09b12a2029d4
Signed-off-by: Corentin Le Gall <corentinlgs@gmail.com>
Diffstat (limited to 'docs/WriteYourTests/Reference/LuaUnitAssertionFunctions/2_ScientificAssertions.md')
-rw-r--r-- | docs/WriteYourTests/Reference/LuaUnitAssertionFunctions/2_ScientificAssertions.md | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/WriteYourTests/Reference/LuaUnitAssertionFunctions/2_ScientificAssertions.md b/docs/WriteYourTests/Reference/LuaUnitAssertionFunctions/2_ScientificAssertions.md new file mode 100644 index 0000000..9f80a7a --- /dev/null +++ b/docs/WriteYourTests/Reference/LuaUnitAssertionFunctions/2_ScientificAssertions.md @@ -0,0 +1,48 @@ +# Scientific assertions + +>**Note** +>If you need to deal with value minus zero, be very careful because Lua versions +are inconsistent on how they treat the >syntax -0 : it creates either a plus +zero or a minus zero. Multiplying or dividing 0 by -1 also yields inconsistent > +results. The reliable way to create the -0 value is : minusZero = -1 / (1/0). + +* **_AFT.assertIsNaN(value)** + Assert that a given number is a *NaN* (Not a Number), according to the + definition of IEEE-754_ . If provided, *extra_msg* is a string which will + be printed along with the failure message. + +* **_AFT.assertIsPlusInf(value)** + + Assert that a given number is *plus infinity*, according to the definition of + IEEE-754_. If provided, *extra_msg* is a string which will be printed along + with the failure message. + +* **_AFT.assertIsMinusInf(value)** + + Assert that a given number is *minus infinity*, according to the definition of + IEEE-754_. If provided, *extra_msg* is a string which will be printed along + with the failure message. + +* **_AFT.assertIsInf(value)** + + Assert that a given number is *infinity* (either positive or negative), + according to the definition of IEEE-754_. If provided, *extra_msg* is a string + which will be printed along with the failure message. + +* **_AFT.assertIsPlusZero(value)** + + Assert that a given number is *+0*, according to the definition of IEEE-754_. + The verification is done by dividing by the provided number and verifying + that it yields *infinity* . If provided, *extra_msg* is a string which will + be printed along with the failure message. + + Be careful when dealing with *+0* and *-0*, see note above + +* **_AFT.assertIsMinusZero(value)** + + Assert that a given number is *-0*, according to the definition of IEEE-754_. + The verification is done by dividing by the provided number and verifying that + it yields *minus infinity* . If provided, *extra_msg* is a string which will + be printed along with the failure message. + + Be careful when dealing with *+0* and *-0*
\ No newline at end of file |