Well, you can group tests into more test classes. To run it in embedded editor, you can wrap them into one suite, like:
import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Suite; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @RunWith(Suite.class) @Suite.SuiteClasses({ MyTestSuite.MyTests.class, MyTestSuite.MyTests2.class }) public class MyTestSuite { public static class MyTests { @Test public void testIt() { assertThat(true, is(true)); } } public static class MyTests2 { @Test public void testIt2() { assertThat(false, is(false)); } } }
FYI: I was able to submit my solution after commenting out my test method
It can be done simply by lowering delta:
assertEquals(5881.25D, Circle.area(43.2673), 0.001);
or by comparing strings:
assertEquals("5881.25", String.valueOf(Circle.area(43.2673)));
Null check missing
Conversion of array to list is needless here.
It's probably bug in codewars (or in some specific library version). You should report it.
Could you please change the assertion to this form, so we can submit our solutions:
assertThat(CaffeineBuzz.caffeineBuzz(12), is("CoffeScript"));
Thanks
Well the root cause is extra 'e' in your assertion. When I run it outside codewars I get:
org.junit.ComparisonFailure: Expected :CoffeeScript Actual :CoffeScript
But I don't know, why it doesn't show the correct output here.
FYI: if you use assertThat notation, it works OK ;)
assertThat(CaffeineBuzz.caffeineBuzz(12), is("CoffeeScript")); //wrong test with extra 'e'
This comment is hidden because it contains spoiler information about the solution
@mcclaskc could you please check your submission tests? This error is really strange.
Description upgraded.
Well, it's just naming convention (not a standard) that it should be lowerCamelCase.
lowerCamelCase
Some aged resources are referrenced in http://en.wikipedia.org/wiki/Naming_convention_(programming)#Java and one can find the same convention in the majority of style guides for java repositories - see e.g. Google: https://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.5-non-constant-field-names
Having trouble submitting Java solution. Getting weird empty test result:
test_caffeineBuzz(CaffeineBuzz_Test) expected: but was:
When I add the debug output, the last call of my caffeineBuzz function before the error is with the n = 12.
n = 12
The only unsightly part here is m_... naming convention (not from Java world).
m_...
Agree with trollingIsAart. This solution is not correct.
This solution is not correct - try e.g. squareSum([2, 1, 2])
Loading collection data...
Well, you can group tests into more test classes. To run it in embedded editor, you can wrap them into one suite, like:
FYI: I was able to submit my solution after commenting out my test method
It can be done simply by lowering delta:
or by comparing strings:
Null check missing
Conversion of array to list is needless here.
It's probably bug in codewars (or in some specific library version). You should report it.
Could you please change the assertion to this form, so we can submit our solutions:
Thanks
Well the root cause is extra 'e' in your assertion. When I run it outside codewars I get:
But I don't know, why it doesn't show the correct output here.
FYI: if you use assertThat notation, it works OK ;)
This comment is hidden because it contains spoiler information about the solution
@mcclaskc could you please check your submission tests? This error is really strange.
Description upgraded.
Well, it's just naming convention (not a standard) that it should be
lowerCamelCase
.Some aged resources are referrenced in http://en.wikipedia.org/wiki/Naming_convention_(programming)#Java and one can find the same convention in the majority of style guides for java repositories - see e.g. Google: https://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.5-non-constant-field-names
Having trouble submitting Java solution. Getting weird empty test result:
When I add the debug output, the last call of my caffeineBuzz function before the error is with the
n = 12
.The only unsightly part here is
m_...
naming convention (not from Java world).Agree with trollingIsAart. This solution is not correct.
This solution is not correct - try e.g. squareSum([2, 1, 2])
Loading more items...