Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.6-rc-1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
Here's a couple of simple tests to show the bug:
Here is unit test that fails to run.
class NegativeParameterWithNoParenthesis extends GroovyTestCase
{
def foo(a, b) {}
void testFooWithNegativeParameter()
{
foo(-1, 2)
}
void testFooWithNegativeParameterNoParenthesis()
{
foo -1, 2
}
}
-------------------------------- second test --------------------------------------
class TestDSL {
def orientation( double azimuth, double elevation ) {
println("azimuth = " + azimuth + " elevation = " + elevation);
}
def static process(dsl) {
def closure = (Closure)new GroovyShell().evaluate("{->" + dsl + "}");
closure.delegate = new TestDSL();
closure();
}
}
here's the dsl file (which I named test.dsl):
orientation -45.0, 45.0
to run the test:
TestDSL.process(new File("test.dsl").text);
add code tags