groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <pa...@asert.com.au>
Subject Re: Command Chain in assert
Date Sun, 08 Nov 2015 06:26:39 GMT
To rephrase slightly,  it's not *currently* possible. We could change the
grammar and add a special parsing rule but then that would probably rule
out DSLs with assert as the first word. The parens proposal in the
previously referenced jira is more likely the way we'd want to go.
On 8 Nov 2015 3:17 am, "Pascal Schumacher" <pascalschumacher@gmx.net> wrote:

> I guess it's not possible. :(
>
> There is already an enhancement request
> https://issues.apache.org/jira/browse/GROOVY-4808 "Command Chain + Power
> Assert doesn't work" in JIRA.
>
> -Pascal
>
> Am 06.11.2015 um 22:42 schrieb Winnebeck, Jason:
>
>> Is it possible to support command chain in asserts? I'm trying to create
>> a testing DSL.
>>
>> The expression item("abc").exists will return a boolean. So I can do this:
>>
>> item "abc" exists
>>
>> But I can't do this:
>> assert item "abc" exists
>>
>> Is something like that possible?
>>
>> Jason
>>
>> ----------------------------------------------------------------------
>> This email message and any attachments are for the sole use of the
>> intended recipient(s). Any unauthorized review, use, disclosure or
>> distribution is prohibited. If you are not the intended recipient, please
>> contact the sender by reply email and destroy all copies of the original
>> message and any attachments.
>>
>
>

Mime
View raw message