groovy

println prepends erroneous "." to result of Class#getSimpleName()

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.0-JSR-6
  • Fix Version/s: 1.0-RC-1
  • Component/s: None
  • Labels:
    None
  • Environment:
    Groovy Version: 1.0-JSR-06 JVM: 1.5.0_06-b05
  • Testcase included:
    yes
  • Number of attachments :
    1

Description

Result of this test:

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

is:

.GroovyTestCase
GroovyTestCase

Time: 0.016

OK (1 test)

Where is the period coming from?

Activity

Hide
Jeff Wild added a comment -

Looks like it's output from a testXXX method. An empty testXXX() also outputs a "."

Show
Jeff Wild added a comment - Looks like it's output from a testXXX method. An empty testXXX() also outputs a "."
Hide
Russel Winder added a comment -

The . is output from JUnit and is expected which is why Guillaume closed this issue and marked it `won't fix' – there is nothing to fix!

Show
Russel Winder added a comment - The . is output from JUnit and is expected which is why Guillaume closed this issue and marked it `won't fix' – there is nothing to fix!

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: