Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running transpose tests #61

Open
ErikSchierboom opened this issue Apr 16, 2024 · 2 comments
Open

Error running transpose tests #61

ErikSchierboom opened this issue Apr 16, 2024 · 2 comments

Comments

@ErikSchierboom
Copy link
Member

When running the tests for the transpose exercise with the following code:

object Transpose {

     fun transpose(input: List<String>): List<String> {
        val longestLength = input.map { it.length }.max()
		return List(longestLength) { index -> 
            input
                .map { it.padEnd(longestLength) }
        	    .map { it[index] }
                .joinToString(separator = "")
        }.map { it.trimEnd() }
    }
}

The test runner fails with:

Picked up JAVA_TOOL_OPTIONS: -Xss128m -Xms256m -Xmx2G -XX:+UseG1GC
Exception in thread "main" java.lang.NullPointerException: attribute(...) must not be null
	at utils.junit.ParserKt.get(parser.kt:97)
	at utils.junit.ParserKt.asError(parser.kt:51)
	at utils.junit.ParserKt.asTestCase(parser.kt:37)
	at utils.junit.ParserKt.asTestSuit(parser.kt:26)
	at utils.junit.ParserKt.parseJUnit4Results(parser.kt:14)
	at exercism.kotlin.autotests.executor.ExecutorKt.buildExecutionResult(executor.kt:101)
	at exercism.kotlin.autotests.executor.ExecutorKt.executor(executor.kt:12)
	at exercism.kotlin.autotests.runner.MainKt$main$result$1.invoke(main.kt:28)
	at exercism.kotlin.autotests.runner.MainKt$main$result$1.invoke(main.kt:28)
	at exercism.kotlin.autotests.executor.EnvironmentKt.executeOnEnvironment(environment.kt:16)
	at exercism.kotlin.autotests.runner.MainKt.main(main.kt:28)

@ErwinOlie Do you have any idea?

@ErwinOlie
Copy link
Contributor

There seems to be a problem with parsing the junit4 test report. Can you post the content of the TESTsomething.xml file which is produced after running the test?

@ErikSchierboom
Copy link
Member Author

I don't see the test file. Where should that be located?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants