Skip to content

Commit

Permalink
aoc: internal is now aoc
Browse files Browse the repository at this point in the history
  • Loading branch information
janreggie committed May 25, 2021
1 parent e7476fb commit 269fa7c
Show file tree
Hide file tree
Showing 62 changed files with 189 additions and 180 deletions.
6 changes: 3 additions & 3 deletions aoc2015/day01_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

func TestDay01(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Input: ")",
Result1: "-1",
Result2: "1"},
Expand All @@ -30,5 +30,5 @@ func TestDay01(t *testing.T) {
}

func BenchmarkDay01(b *testing.B) {
internal.Benchmark(Day01, b, day01myInput)
aoc.Benchmark(Day01, b, day01myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day02_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

func TestDay02(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Input: "2x3x4",
Result1: "58",
Result2: "34"},
Expand Down Expand Up @@ -37,5 +37,5 @@ func TestDay02(t *testing.T) {
}

func BenchmarkDay02(b *testing.B) {
internal.Benchmark(Day02, b, day01myInput)
aoc.Benchmark(Day02, b, day01myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day03_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

func TestDay03(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Input: "^v",
Result1: "2",
Result2: "3"},
Expand All @@ -29,5 +29,5 @@ func TestDay03(t *testing.T) {
}
}
func BenchmarkDay03(b *testing.B) {
internal.Benchmark(Day03, b, day01myInput)
aoc.Benchmark(Day03, b, day01myInput)
}
8 changes: 4 additions & 4 deletions aoc2015/day04_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

func TestDay04(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Details: "Y2015D04 my input",
Input: day04myInput,
Result1: "346386",
Expand All @@ -21,9 +21,9 @@ func TestDay04(t *testing.T) {
}

func BenchmarkDay04(b *testing.B) {
internal.Benchmark(Day04, b, day04myInput)
aoc.Benchmark(Day04, b, day04myInput)
}

func BenchmarkDay04ST(b *testing.B) {
internal.Benchmark(Day04ST, b, day04myInput)
aoc.Benchmark(Day04ST, b, day04myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day05_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

func TestDay05(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
// Note that the results represent how many nice strings there are.
// And since there is only one input,
// a result of 0 means that the string is naughty (at least in Part One or Two)
Expand Down Expand Up @@ -156,5 +156,5 @@ func Test_checkNiceTwo(t *testing.T) {
}

func BenchmarkDay05(b *testing.B) {
internal.Benchmark(Day05, b, day05myInput)
aoc.Benchmark(Day05, b, day05myInput)
}
8 changes: 4 additions & 4 deletions aoc2015/day06_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

func TestDay06(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Input: "toggle 936,774 through 937,775\n" + // ans1 += 4; ans2 += 8
"turn off 116,843 through 533,934\n" + // nothing
"turn on 950,906 through 986,993\n", // ans1 += 3256; ans2 += 3256
Expand All @@ -31,7 +31,7 @@ func TestDay06(t *testing.T) {
}
func TestDay06Deux(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Input: "toggle 936,774 through 937,775\n" + // ans1 += 4; ans2 += 8
"turn off 116,843 through 533,934\n" + // nothing
"turn on 950,906 through 986,993\n", // ans1 += 3256; ans2 += 3256
Expand All @@ -53,5 +53,5 @@ func TestDay06Deux(t *testing.T) {
}

func BenchmarkDay06(b *testing.B) {
internal.Benchmark(Day06, b, day06myInput)
aoc.Benchmark(Day06, b, day06myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day07_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -524,7 +524,7 @@ func Test_instruction_operationName(t *testing.T) {

func TestDay07(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Details: "Y2016D07 my input",
Input: day07myInput,
Result1: "3176",
Expand All @@ -536,5 +536,5 @@ func TestDay07(t *testing.T) {
}

func BenchmarkDay07(b *testing.B) {
internal.Benchmark(Day07, b, day07myInput)
aoc.Benchmark(Day07, b, day07myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day08_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

func TestDay08(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Input: `""`,
Result1: "2",
Result2: "4"},
Expand All @@ -33,5 +33,5 @@ func TestDay08(t *testing.T) {
}

func BenchmarkDay08(b *testing.B) {
internal.Benchmark(Day08, b, day08myInput)
aoc.Benchmark(Day08, b, day08myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day09_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -304,7 +304,7 @@ func Test_townPathQueue_pushAndPop(t *testing.T) {

func TestDay09(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Input: "London to Dublin = 464\n" +
"London to Belfast = 518\n" +
"Dublin to Belfast = 141\n",
Expand All @@ -322,7 +322,7 @@ func TestDay09(t *testing.T) {
}

func BenchmarkDay09(b *testing.B) {
internal.Benchmark(Day09, b, day09myInput)
aoc.Benchmark(Day09, b, day09myInput)
}

func Benchmark_graph_shortestPathPermutative(b *testing.B) {
Expand Down
6 changes: 3 additions & 3 deletions aoc2015/day10_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

Expand All @@ -26,7 +26,7 @@ func Test_lookAndSay(t *testing.T) {

func TestDay10(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Details: "Y2015D10 my input",
Input: day10myInput,
Result1: "329356",
Expand All @@ -38,5 +38,5 @@ func TestDay10(t *testing.T) {
}

func BenchmarkDay10(b *testing.B) {
internal.Benchmark(Day10, b, day10myInput)
aoc.Benchmark(Day10, b, day10myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day11_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -43,7 +43,7 @@ func Test_increment(t *testing.T) {

func TestDay11(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Input: "abcdefgh", Result1: "abcdffaa"},
{Input: "ghijklmn", Result1: "ghjaabcc"},
{Details: "Y2015D11 my input", Input: day11myInput, Result1: "hepxxyzz", Result2: "heqaabcc"},
Expand All @@ -54,5 +54,5 @@ func TestDay11(t *testing.T) {
}

func BenchmarkDay11(b *testing.B) {
internal.Benchmark(Day11, b, day11myInput)
aoc.Benchmark(Day11, b, day11myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day12_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/antonholmquist/jason"
"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -52,7 +52,7 @@ func Test_extractSumButRed(t *testing.T) {
}
func TestDay12(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Details: "Y2015D12 my input",
Input: day12myInput,
Result1: "111754",
Expand All @@ -64,5 +64,5 @@ func TestDay12(t *testing.T) {
}

func BenchmarkDay12(b *testing.B) {
internal.Benchmark(Day12, b, day12myInput)
aoc.Benchmark(Day12, b, day12myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day13_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -167,7 +167,7 @@ func Test_seatingArrangementQueue(t *testing.T) {

func TestDay13(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Details: "Y2015D13 sample input",
Input: day13sampleInput,
Result1: "330",
Expand Down Expand Up @@ -195,5 +195,5 @@ func Benchmark_tableScenario_happiestPermutative(b *testing.B) {
}

func BenchmarkDay13(b *testing.B) {
internal.Benchmark(Day13, b, day13myInput)
aoc.Benchmark(Day13, b, day13myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day14_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -145,7 +145,7 @@ func Test_reindeerOlympics_iterate(t *testing.T) {

func TestDay14(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Details: "Y2015D14 my input",
Input: day14myInput,
Result1: "2660",
Expand All @@ -157,5 +157,5 @@ func TestDay14(t *testing.T) {
}

func BenchmarkDay14(b *testing.B) {
internal.Benchmark(Day14, b, day14myInput)
aoc.Benchmark(Day14, b, day14myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day16_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

func TestDay16(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Details: "Y2015D16 my test case",
Input: day16myInput,
Result1: "40",
Expand All @@ -21,5 +21,5 @@ func TestDay16(t *testing.T) {
}

func BenchmarkDay16(b *testing.B) {
internal.Benchmark(Day16, b, day16myInput)
aoc.Benchmark(Day16, b, day16myInput)
}
6 changes: 3 additions & 3 deletions aoc2015/day17_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package aoc2015
import (
"testing"

"github.com/janreggie/aoc/internal"
aoc "github.com/janreggie/aoc/internal"
"github.com/stretchr/testify/assert"
)

func TestDay17(t *testing.T) {
assert := assert.New(t)
testCases := []internal.TestCase{
testCases := []aoc.TestCase{
{Details: "Y2019D17 sample input",
Input: day17myInput,
Result1: "654",
Expand All @@ -21,5 +21,5 @@ func TestDay17(t *testing.T) {
}

func BenchmarkDay17(b *testing.B) {
internal.Benchmark(Day17, b, day17myInput)
aoc.Benchmark(Day17, b, day17myInput)
}
Loading

0 comments on commit 269fa7c

Please sign in to comment.