Would it be possible in the near future to hava a shorter syntax for using dynamic content?
Dynamic content is really neat, but the syntax makes the test harder to read.
I guess ideally it would look something like this:
@Test public void shortSyntax() {
/*!
The value of foo = #{foo}
*/
store("foo", "bar");
}
the 'store' part should be easy, using static import. I don't know whether the ruby parser can
handle the syntax I suggested, but if not, maybe you can think of another way to simplify the syntax,
perhaps by not using the ruby #{} syntax, but using a custom syntax and replacing it manually, for example
@foo?
DanielW
Yes, I should definitely implement the static import (and you could
actually do it yourself while waiting for me to get it done :-)).
Embarrassingly enough you're not the first to tell me... :-}
I will then use the store syntax, so you will just need to change the
import if you do it yourself.
I could implement the #{foo} thing as well. Today you can add
arbitrary properties (node-local, where node=e.g. a test or a class)
from within the comments using
#{property_name = 'Some object, not necessarily a string'} and then
retrieve them with #{property_name}. The runtime values could go in
the same "namespace", provided that the key conforms to the Ruby
symbol syntax.
There is a risk of naming collisions, and some names are occupied by
e.g. Ruby and Bumblebee method names, but I think its a good thing
anyway.
Maybe I can keep the old get_value for the cases where you really want
a non-symbol syntax.
Does that sound like a good idea?
I don't like the idea of introducing yet another syntax like @foo, but
I think its solvable anyway. :-)
Could you (or anyone reading this) give me a hint of what you consider
most urgent?
Cheers
Daniel
--
__________________________
Daniel....@Gmail.com