Add an ignored test for type casting.

I think in order to support type casting in a generic fashion so that custom non-json types can be used, I'll need to push the implementation of helpers off into the traits instead of handling it in the renderer. This is a larger undertaking than I was planning on starting at this very moment, so I'm going to leave this test disabled and move on to a couple smaller tasks I wanted to knock out before starting implementation on custom helpers.
master
Tom Alexander 4 years ago
parent 6c89f7c59a
commit 1ad9753845
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

@ -0,0 +1,3 @@
Type casting appears to work on referenced values as well as literals. Do I add a separate type cast function or push the entire implementation of the helpers off into the traits? If I'm supporting custom helpers in the future I'll need to push off the helper implementation eventually anyway.
What other types are available? All I see referenced in the docs is "number".

@ -0,0 +1,4 @@
{
"str": "7",
"int": 7
}

@ -0,0 +1,5 @@
{@eq key=str value="7"}str is equal to "7"{:else}str does not equal "7"{/eq}{~n}
{@eq key=int value="7"}int is equal to "7"{:else}int does not equal "7"{/eq}{~n}
{@eq key=int value="7" type="number"}int is equal to "7"::number{:else}int does not equal "7"::number{/eq}{~n}
{@eq key=int value=str}int is equal to str{:else}int does not equal str{/eq}{~n}
{@eq key=int value=str type="number"}int is equal to str::number{:else}int does not equal str::number{/eq}{~n}
Loading…
Cancel
Save