Repository navigation
Update RaindropConverterTest.java - #1303
Merged
Merged
Conversation
Changed from parametrized tests to individual tests to allow TDD so tests can be ignored.
Contributor
Author
|
How can I check why the build failed? Can't seem to find it in the Travis CI job log. Thanks! |
sjwarner-bp
suggested changes
Feb 11, 2018
Contributor
There was a problem hiding this comment.
Hi @Kyle-P
Looks like the build is failing because two of the tests no longer pass:
/home/travis/build/exercism/java/exercises/raindrops/.meta/src/reference/java/RaindropConverter.java)
:raindrops:processResources NO-SOURCE
:raindrops:classes
:raindrops:copyTestsFilteringIgnores
:raindrops:compileTestJava
(source = /home/travis/build/exercism/java/exercises/raindrops/build/gen/test/java/RaindropConverterTest.java)
:raindrops:processTestResources NO-SOURCE
:raindrops:testClasses
:raindrops:testPicked up _JAVA_OPTIONS: -Xmx2048m -Xms512m
RaindropConverterTest > soundFor35IsPlangPong FAILED
org.junit.ComparisonFailure: expected:<PlangP[]ong> but was:<PlangP[l]ong>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at RaindropConverterTest.soundFor35IsPlangPong(RaindropConverterTest.java:58)
RaindropConverterTest > soundFor21IsPlingPlong PASSED
RaindropConverterTest > soundFor7OrNumberWithOnlyDistinctFactorOf7IsPlong PASSED
RaindropConverterTest > noSoundFor2Cubed PASSED
RaindropConverterTest > soundFor5OrNumberWithOnlyDistinctFactorOf5IsPlang PASSED
RaindropConverterTest > soundFor1Is1 PASSED
RaindropConverterTest > noSoundFor52 PASSED
RaindropConverterTest > soundFor105IsPlingPlangPlong FAILED
org.junit.ComparisonFailure: expected:<PlingPlangP[]ong> but was:<PlingPlangP[l]ong>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at RaindropConverterTest.soundFor105IsPlingPlangPlong(RaindropConverterTest.java:68)
RaindropConverterTest > soundFor15IsPlingPlang PASSED
RaindropConverterTest > soundFor3OrNumberWithOnlyDistinctFactorOf3 PASSED
10 tests completed, 2 failed
:raindrops:test FAILED
sjwarner-bp
reviewed
Feb 11, 2018
| @Ignore("Remove to run test") | ||
| @Test | ||
| public void soundFor35IsPlangPong() { | ||
| assertEquals("PlangPong", raindropConverter.convert(35)); |
Contributor
There was a problem hiding this comment.
Just looks like a typo here pong should be plong 🙂
sjwarner-bp
reviewed
Feb 11, 2018
| @Ignore("Remove to run test") | ||
| @Test | ||
| public void soundFor105IsPlingPlangPlong() { | ||
| assertEquals("PlingPlangPong", raindropConverter.convert(105)); |
Contributor
There was a problem hiding this comment.
Same here, just a typo pong -> plong 🙂
Fixed test errors
Contributor
Author
|
Alright, thanks @sjwarner-bp! |
Contributor
|
Looks like the build timed out - I'll kick it off again and then I think this should be good 🙂 |
Contributor
Author
|
Great! Thanks @sjwarner-bp! Looks like everything should be good now. |
sjwarner-bp
approved these changes
Feb 12, 2018
Contributor
|
Thanks @Kyle-P 🎆 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed from parametrized tests to individual tests to allow TDD so tests can be ignored.
Methods to test sounds for prime numbers or numbers with their only factor as that prime number (other than 1 and itself) were grouped together in one method. For example, 3 and numbers which factor out to only 3's such as 9 and 27 were grouped together into one method named
soundFor3OrNumberWithOnlyDistinctFactorOf3.Some formatting may be off, but hopefully, this finishes the job for the raindrops class!
Closes part of #1293 (the raindrops test suite).
Reviewer Resources:
Track Policies