Groovy Bar & Grill

August 16, 2006

Extraneous Period in Groovy println

Filed under: Groovy Grill — jawild59 @ 1:26 pm

Update: Looks like it’s a problem in GroovyTestCase. testXXX() method always outputs a “.”

Update: Ah. It’s JUnit’s text-based test runner that is the culprit. Guess I shouldn’t exclusively use the GUI runner.

GROOVY-1463.

Running this test:

class PrintlnTest extends GroovyTestCase {
  void testSomething() {
    def name = GroovyTestCase.class.simpleName
    assertEquals(GroovyTestCase.class.simpleName, name)
    assertTrue(name.length() == "GroovyTestCase".length())
    println name
    println name
  }
}

produces this output:

.GroovyTestCase
GroovyTestCase

Time: 0

OK (1 test)

Anyone have a clue?

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.