Giter Club home page Giter Club logo

Comments (3)

jespersm avatar jespersm commented on August 20, 2024

This error comes from Eclipse JDT's JUnit support itself.
The problem could be fixable by Eclipse, for methods like def "test that blah"() since it assumes that test methods meet Java naming standards. Perhaps that's where we should be reporting this.

However, for tests using @unroll with string formats, the issue can't really be fixed since the testcase method's name is not reported in the JUnit results, only the testcase's name.

from groovy-eclipse.

apupier avatar apupier commented on August 20, 2024

The issue on JDT side is reported here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=343129

Help is welcome to fix the issue.

from groovy-eclipse.

eric-milles avatar eric-milles commented on August 20, 2024

The problem starts in OpenTestAction, which truncates method name before first non-identifier character. You will need to follow up with the JDT bug to get resolution.

	private static String extractRealMethodName(TestCaseElement testCase) {
		//workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=334864 :
		if (testCase.isIgnored() && JavaConventions.validateJavaTypeName(testCase.getTestName(), JavaCore.VERSION_1_5, JavaCore.VERSION_1_5).getSeverity() != IStatus.ERROR) {
			return null;
		}
		
		//workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=275308 :
		String testMethodName= testCase.getTestMethodName();
		for (int i= 0; i < testMethodName.length(); i++) {
			if (!Character.isJavaIdentifierPart(testMethodName.charAt(i))) {
				return testMethodName.substring(0, i);
			}
		}
		return testMethodName;
	}

from groovy-eclipse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.