开发者

In FitNesse, can variables be defined in terms of other variables?

开发者 https://www.devze.com 2022-12-29 18:12 出处:网络
In FitNesse, can variables be defined in terms of other variables? I want to do the equivalent of: int a=3;

In FitNesse, can variables be defined in terms of other variables?

I want to do the equivalent of:

    int a=3;
    int b=a;

To make this concrete, I have a variable defining the date:

    !define clock.date {2/2/2009}

I then want to define some other variable ${other.date} based on it, something like:

    !define other.date {=${clock.date}=开发者_Go百科}

However, this doesn't work. Is there any way to do this?


The current parser has an issue with nested braces so you can use the alternate syntax for define:

!define x {stuff}

!define y (${x})

This restriction will be removed soon and you'll be able to do !define y {${x}} etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号