Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6-rc-1
-
None
-
None
-
None
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);