Re: SCXML Test 354 uses datamodel-specific <content>?
Jim Barnett <[email protected]> Mon, 30 Jun 2014 09:16:06 -0400
| Newsgroups | gmane.comp.web.voice |
|---|---|
| Message-ID | <[email protected]> |
Gavin, Stefan, and David, My only concern is that Stefan and David's implementations pass 354 in its current form, and I don't want to break their systems. Stefan and David, is it ok with you if we remove the single quotes around 'foo' in 354? Or can we rely on conf:eventDataVal to insert quotes as needed? (We could rename it conf:eventDataStringVal to make it clear.) Or do we need eventDataStringVal and eventDataIntVal? - Jim On 6/29/2014 8:19 PM, Gavin Kistner wrote: > I locally modified my TXML to use the same strategy as 179 (use unquoted 123 in both locations) and it works well enough for me. Is that a change you’d feel OK with making, so that I can remove my local override? > > On Jun 20, 2014, at 8:34 AM, Jim Barnett <[email protected]> wrote: > >> 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 >> -- Jim Barnett Genesys