Re: SCXML Test 354 uses datamodel-specific <content>?

We have had more problems with quotes than anything else in the tests - 
putting them in, taking them out, doubling them, undoubling them.  Does 
anyone else have an opinion on what to do with these tests?

On 6/19/2014 9:27 AM, Gavin Kistner wrote:
> test179.txml has:
> 	<send event="event1"><content>123</content></send>
> 	<transition … conf:eventdataVal="123” … />
>
> My data model evaluates the text content of <content> as code, so that <content expr=“123”/> is the same as <content>123</content>, and my transformation of the tests converts the condition above to <transition cond=“_event.data.val==123” … />.
>
> However, test354.txml has this:
> 	<send  event="event2"><content>foo</content></send>
> 	<transition … conf:eventdataVal="'foo'” … />
> (notice the single quotes around the ‘foo’ inside the double-quotes).
>
> This breaks my data model, since evaluating foo as a Lua expression results in nil, not the string ‘foo’. If I switch my data model to interpret the text child of <content> as a string instead, then test 179 would fail.
>
>
> I can modify this test to change to <content>’foo’</content>, but I think this is too specific to ECMAScript and Lua data models. I would suggest that at a minimum this test should match the pattern from test179. However, ideally, I am afraid that more conf: is really needed here, to be properly generic for data models.
>
>

-- 
Jim Barnett
Genesys

Received on Friday, 20 June 2014 14:35:35 UTC