Add a test case for type casting to the equality helper tests.

This commit is contained in:
Tom Alexander
2020-06-14 16:20:07 -04:00
parent 4731ddaa6b
commit 5dff03bb37
2 changed files with 18 additions and 1 deletions

View File

@@ -30,4 +30,11 @@ Do objects with different paths referencing the same variable match?{~n}
Floating point equality{~n}
======================={~n}
{@eq key=int value=7.0}int is equal to 7.0{:else}int is not equal to 7.0{/eq}
{@eq key=int value=7.0}int is equal to 7.0{~n}{:else}int is not equal to 7.0{~n}{/eq}
Type cast{~n}
========={~n}
{@eq key=int value="7"}int is equal to "7"{~n}{:else}int is not equal to "7"{~n}{/eq}
{@eq key=int value="7" type="number"}int is equal to "7"::number{~n}{:else}int is not equal to "7"::number{~n}{/eq}
{@eq key=beta value=21 type="string"}beta is equal to 21::string{~n}{:else}beta is not equal to 21::string{~n}{/eq}
{@eq key=beta value="21" type="string"}beta is equal to "21"::string{~n}{:else}beta is not equal to "21"::string{~n}{/eq}