Skip to content

Commit

Permalink
aoc 2017 🤫
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCK committed Dec 13, 2024
1 parent b02ce63 commit 68aafd3
Show file tree
Hide file tree
Showing 44 changed files with 207 additions and 1,727 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

class Day11Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a", "01b"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a", "01b"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day11()::partOne, ("day11/%s").formatted(name));
}

@ParameterizedTest
@ValueSource(strings = {"02"})
void testTwo(String name) throws Exception {
runTest(new Day11()::partTwo, "day11/%s".formatted(name));
@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day11()::partOne, "day11/01");
}

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day11()::partTwo, "day11/02");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

class Day12Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a", "01b", "01c", "01d", "01e", "01f", "01g", "01h"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a", "01b", "01c", "01d", "01e", "01f", "01g", "01h"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day12()::partOne, "day12/%s".formatted(name));
}

@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day12()::partOne, "day12/01");
}

@ParameterizedTest
@ValueSource(strings = {"02", "02a", "02b", "02c", "02d"})
void testTwo(String name) throws Exception {
@ValueSource(strings = {"02a", "02b", "02c", "02d"})
void testPartTwoExamples(String name) throws Exception {
runTest(new Day12()::partTwo, "day12/%s".formatted(name));
}

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day12()::partTwo, "day12/02");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

class Day13Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day13()::partOne, "day13/%s".formatted(name));
}

@ParameterizedTest
@ValueSource(strings = {"02"})
void testTwo(String name) throws Exception {
runTest(new Day13()::partTwo, "day13/%s".formatted(name));
@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day13()::partOne, "day13/01");
}

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day13()::partTwo, "day13/02");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

class Day14Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day14()::partOne, "day14/%s".formatted(name));
}

@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day14()::partOne, "day14/01");
}

@ParameterizedTest
@ValueSource(strings = {"02", "02a"})
void testTwo(String name) throws Exception {
@ValueSource(strings = {"02a"})
void testPartTwoExamples(String name) throws Exception {
runTest(new Day14()::partTwo, "day14/%s".formatted(name));
}

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day14()::partTwo, "day14/02");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

class Day15Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day15()::partOne, "day15/%s".formatted(name));
}

@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day15()::partOne, "day15/01");
}

@ParameterizedTest
@ValueSource(strings = {"02", "02a"})
void testTwo(String name) throws Exception {
@ValueSource(strings = {"02a"})
void testPartTwoExamples(String name) throws Exception {
runTest(new Day15()::partTwo, "day15/%s".formatted(name));
}

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day15()::partTwo, "day15/02");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.junit.jupiter.api.Test;

class Day16Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01"})
void testOne(String name) throws Exception {
runTest(new Day16()::partOne, "day16/%s".formatted(name));
@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day16()::partOne, "day16/01");
}

@ParameterizedTest
@ValueSource(strings = {"02"})
void testTwo(String name) throws Exception {
runTest(new Day16()::partTwo, "day16/%s".formatted(name));
@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day16()::partTwo, "day16/02");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

class Day17Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day17()::partOne, "day17/%s".formatted(name));
}

@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day17()::partOne, "day17/01");
}

@ParameterizedTest
@ValueSource(strings = {"02", "02a"})
void testTwo(String name) throws Exception {
@ValueSource(strings = {"02a"})
void testPartTwoExamples(String name) throws Exception {
runTest(new Day17()::partTwo, "day17/%s".formatted(name));
}

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day17()::partTwo, "day17/02");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

class Day18Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day18()::partOne, "day18/%s".formatted(name));
}

@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day18()::partOne, "day18/01");
}

@ParameterizedTest
@ValueSource(strings = {"02", "02a"})
void testTwo(String name) throws Exception {
@ValueSource(strings = {"02a"})
void testPartTwoExamples(String name) throws Exception {
runTest(new Day18()::partTwo, "day18/%s".formatted(name));
}

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day18()::partTwo, "day18/02");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

class Day19Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day19()::partOne, "day19/%s".formatted(name));
}

@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day19()::partOne, "day19/01");
}

@ParameterizedTest
@ValueSource(strings = {"02", "02a", "02b"})
void testTwo(String name) throws Exception {
@ValueSource(strings = {"02a", "02b"})
void testPartTwoExamples(String name) throws Exception {
runTest(new Day19()::partTwo, "day19/%s".formatted(name));
}

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day19()::partTwo, "day19/02");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

class Day20Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day20()::partOne, "day20/%s".formatted(name));
}

@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day20()::partOne, "day20/01");
}

@ParameterizedTest
@ValueSource(strings = {"02", "02a"})
void testTwo(String name) throws Exception {
@ValueSource(strings = {"02a"})
void testPartTwoExamples(String name) throws Exception {
runTest(new Day20()::partTwo, "day20/%s".formatted(name));
}

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day20()::partTwo, "day20/02");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

class Day21Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day21()::partOne, "day21/%s".formatted(name));
}

@ParameterizedTest
@ValueSource(strings = {"02"})
void testTwo(String name) throws Exception {
runTest(new Day21()::partTwo, "day21/%s".formatted(name));
@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day21()::partOne, "day21/01");
}

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day21()::partTwo, "day21/02");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
package org.ck.adventofcode.year2015;

import org.ck.adventofcode.util.BaseAOCTest;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.junit.jupiter.api.Test;

class Day22Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01"})
void testOne(String name) throws Exception {
runTest(new Day22()::partOne, "day22/%s".formatted(name));
@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day22()::partOne, "day22/01");
}

@ParameterizedTest
@ValueSource(strings = {"02"})
void testTwo(String name) throws Exception {
runTest(new Day22()::partTwo, "day22/%s".formatted(name));
@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day22()::partTwo, "day22/02");
}
}
Loading

0 comments on commit 68aafd3

Please sign in to comment.