Skip to content

Commit

Permalink
aoc 2017 day 3 - 10 🤫
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCK committed Dec 13, 2024
1 parent 932c31e commit b02ce63
Show file tree
Hide file tree
Showing 26 changed files with 120 additions and 3,998 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
class Day01Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01a", "01b", "01c", "01d", "01e", "01f", "01g", "01h", "01i"})
void testOne(String name) throws Exception {
void testPartOneExamples(String name) throws Exception {
runTest(new Day01()::partOne, "day01/%s".formatted(name));
}

@Test
void testOne() throws Exception {
void testPartOne() throws Exception {
runEncryptedTest(new Day01()::partOne, "day01/01");
}

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

@Test
void testTwo() throws Exception {
void testPartTwo() throws Exception {
runEncryptedTest(new Day01()::partTwo, "day01/02");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
class Day02Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01a", "01b"})
void testOne(String name) throws Exception {
void testPartOneExamples(String name) throws Exception {
runTest(new Day02()::partOne, "day02/%s".formatted(name));
}

@Test
void testOne() throws Exception {
void testPartOne() throws Exception {
runEncryptedTest(new Day02()::partOne, "day02/01");
}

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

@Test
void testTwo() throws Exception {
void testPartTwo() throws Exception {
runEncryptedTest(new Day02()::partTwo, "day02/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 Day03Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a", "01b", "01c"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a", "01b", "01c"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day03()::partOne, "day03/%s".formatted(name));
}

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

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

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day03()::partTwo, "day03/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 Day04Test 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 Day04()::partOne, "day04/%s".formatted(name));
}

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

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day04()::partTwo, "day04/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 Day05Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a", "01b", "01c", "01d", "01e"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a", "01b", "01c", "01d", "01e"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day05()::partOne, "day05/%s".formatted(name));
}

@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day05()::partOne, "day05/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 Day05()::partTwo, "day05/%s".formatted(name));
}

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day05()::partTwo, "day05/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 Day06Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01"})
void testOne(String name) throws Exception {
runTest(new Day06()::partOne, "day06/%s".formatted(name));
@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day06()::partOne, "day06/01");
}

@ParameterizedTest
@ValueSource(strings = {"02"})
void testTwo(String name) throws Exception {
runTest(new Day06()::partTwo, "day06/%s".formatted(name));
@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day06()::partTwo, "day06/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 Day07Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01"})
void testOne(String name) throws Exception {
runTest(new Day07()::partOne, "day07/%s".formatted(name));
@Test
void testPartOne() throws Exception {
runEncryptedTest(new Day07()::partOne, "day07/01");
}

@ParameterizedTest
@ValueSource(strings = {"02"})
void testTwo(String name) throws Exception {
runTest(new Day07()::partTwo, "day07/%s".formatted(name));
@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day07()::partTwo, "day07/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 Day08Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day08()::partOne, "day08/%s".formatted(name));
}

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

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

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day08()::partTwo, "day08/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 Day09Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day09()::partOne, "day09/%s".formatted(name));
}

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

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

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day09()::partTwo, "day09/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 Day10Test extends BaseAOCTest {
@ParameterizedTest
@ValueSource(strings = {"01", "01a"})
void testOne(String name) throws Exception {
@ValueSource(strings = {"01a"})
void testPartOneExamples(String name) throws Exception {
runTest(new Day10()::partOne, "day10/%s".formatted(name));
}

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

@Test
void testPartTwo() throws Exception {
runEncryptedTest(new Day10()::partTwo, "day10/02");
}
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
bgvyzdsv
qdw18zzqV7G+VBXSP+xdIw==@5ei/SlrGvTrI72M7ulBQbDHmhy3O6niw
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bgvyzdsv
qdw18zzqV7G+VBXSP+xdIw==@5ei/SlrGvTrI72M7ulBQbDHmhy3O6niw
Loading

0 comments on commit b02ce63

Please sign in to comment.