Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private SherlockAndAnagramsTest() {}
/**
* sherlockAndAnagrams.
*/
@Test void sherlockAndAnagrams() {
@Test void testSherlockAndAnagrams() {
for (SherlockAndAnagramsTestCase _testCases : this.testCases) {

for (SherlockAndAnagramsTestCase.TestCase test : _testCases.tests) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void setup() throws IOException {
}

@Test
void testLuckBalance() {
void testAngryFlorist() {
for (AngryFloristTestCase test : testCases) {
Integer result = AngryFlorist.maxMin(test.k, test.arr);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void setup() throws IOException {
}

@Test
void testLuckBalance() {
void testGreedyFlorist() {
for (GreedyFloristTestCase test : testCases) {
int[] inputArray = test.c.stream().mapToInt(Integer::intValue).toArray();
Integer result = GreedyFlorist.getMinimumCost(test.k, inputArray);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void setup() throws IOException {
}

@Test
void testLuckBalance() {
void testMinimumAbsoluteDifferenceInAnArray() {
for (MinimumAbsoluteDifferenceInAnArrayTestCase test : testCases) {
Integer result = MinimumAbsoluteDifferenceInAnArray.minimumAbsoluteDifference(test.input);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@
* FlippingBitsTflippingBits.
*/
@TestInstance(Lifecycle.PER_CLASS)
class FlippingBitsTestAlternativeTest {
class FlippingBitsAlternativeTest {
/**
* FlippingBitsTestAlternativeTestCaseTest.
* FlippingBitsAlternativeTestCaseTest.
*/
public static class FlippingBitsTestAlternativeTestCaseTest {
public static class FlippingBitsAlternativeTestCaseTest {
public long input;
public long answer;
}

/**
* FlippingBitsTestAlternativeTestCase.
* FlippingBitsAlternativeTestCase.
*/
public static class FlippingBitsTestAlternativeTestCase {
public static class FlippingBitsAlternativeTestCase {
public String title;
public List<FlippingBitsTestAlternativeTestCaseTest> tests;
public List<FlippingBitsAlternativeTestCaseTest> tests;
}

private List<FlippingBitsTestAlternativeTestCase> testCases;
private List<FlippingBitsAlternativeTestCase> testCases;

@BeforeAll
void setup() throws IOException {
Expand All @@ -41,13 +41,13 @@ void setup() throws IOException {
"miscellaneous",
"flipping_bits.testcases.json");

this.testCases = JsonLoader.loadJson(path, FlippingBitsTestAlternativeTestCase.class);
this.testCases = JsonLoader.loadJson(path, FlippingBitsAlternativeTestCase.class);
}

@Test
void testLuckBalance() {
for (FlippingBitsTestAlternativeTestCase tests : testCases) {
for (FlippingBitsTestAlternativeTestCaseTest test : tests.tests) {
void testFlippingBitsAlternative() {
for (FlippingBitsAlternativeTestCase tests : testCases) {
for (FlippingBitsAlternativeTestCaseTest test : tests.tests) {
Long result = FlippingBitsAlternative.flippingBits(test.input);

assertEquals(test.answer, result,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void setup() throws IOException {
}

@Test
void testLuckBalance() {
void testFlippingBits() {
for (FlippingBitsTestCase tests : testCases) {
for (FlippingBitsTestCaseTest test : tests.tests) {
Long result = FlippingBits.flippingBits(test.input);
Expand Down
Loading