2020-day12: 243 on part 1, then confused the heck out of myself for part 2 w/ x/y vs row/col vs x,y coordinates and rotating around the origin..

This commit is contained in:
alexchao26
2020-12-12 01:14:53 -05:00
parent 94aaf24b9d
commit 975bc3346d
2 changed files with 111 additions and 17 deletions
+15 -5
View File
@@ -1,14 +1,24 @@
package main
import "testing"
import (
"testing"
"github.com/alexchao26/advent-of-code-go/util"
)
var exampleInput = `F10
N3
F7
R90
F11`
var tests1 = []struct {
name string
want int
input string
// add extra args if needed
}{
// {"actual", ACTUAL_ANSWER, util.ReadFile("input.txt")},
{"example", 25, exampleInput},
{"actual", 820, util.ReadFile("input.txt")},
}
func TestPart1(t *testing.T) {
@@ -25,9 +35,9 @@ var tests2 = []struct {
name string
want int
input string
// add extra args if needed
}{
// {"actual", ACTUAL_ANSWER, util.ReadFile("input.txt")},
{"example", 286, exampleInput},
{"actual", 66614, util.ReadFile("input.txt")},
}
func TestPart2(t *testing.T) {