Skip to content

Commit c68cbf3

Browse files
committed
Add uncommited changes
1 parent c6e8173 commit c68cbf3

File tree

6 files changed

+92
-3
lines changed

6 files changed

+92
-3
lines changed

2015/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Advent of Code 2025
1+
# Advent of Code 2015
22
My solutions to the [Advent of Code 2015](https://adventofcode.com/2015) puzzles.
33

44
## Test

2021/day16/data/example.txt

Whitespace-only changes.

2021/day16/data/input.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
005410C99A9802DA00B43887138F72F4F652CC0159FE05E802B3A572DBBE5AA5F56F6B6A4600FCCAACEA9CE0E1002013A55389B064C0269813952F983595234002DA394615002A47E06C0125CF7B74FE00E6FC470D4C0129260B005E73FCDFC3A5B77BF2FB4E0009C27ECEF293824CC76902B3004F8017A999EC22770412BE2A1004E3DCDFA146D00020670B9C0129A8D79BB7E88926BA401BAD004892BBDEF20D253BE70C53CA5399AB648EBBAAF0BD402B95349201938264C7699C5A0592AF8001E3C09972A949AD4AE2CB3230AC37FC919801F2A7A402978002150E60BC6700043A23C618E20008644782F10C80262F005679A679BE733C3F3005BC01496F60865B39AF8A2478A04017DCBEAB32FA0055E6286D31430300AE7C7E79AE55324CA679F9002239992BC689A8D6FE084012AE73BDFE39EBF186738B33BD9FA91B14CB7785EC01CE4DCE1AE2DCFD7D23098A98411973E30052C012978F7DD089689ACD4A7A80CCEFEB9EC56880485951DB00400010D8A30CA1500021B0D625450700227A30A774B2600ACD56F981E580272AA3319ACC04C015C00AFA4616C63D4DFF289319A9DC401008650927B2232F70784AE0124D65A25FD3A34CC61A6449246986E300425AF873A00CD4401C8A90D60E8803D08A0DC673005E692B000DA85B268E4021D4E41C6802E49AB57D1ED1166AD5F47B4433005F401496867C2B3E7112C0050C20043A17C208B240087425871180C01985D07A22980273247801988803B08A2DC191006A2141289640133E80212C3D2C3F377B09900A53E00900021109623425100723DC6884D3B7CFE1D2C6036D180D053002880BC530025C00F700308096110021C00C001E44C00F001955805A62013D0400B400ED500307400949C00F92972B6BC3F47A96D21C5730047003770004323E44F8B80008441C8F51366F38F240

2021/day16/day16.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package day16
2+
3+
import (
4+
"fmt"
5+
"github.com/jvgrootveld/advent-of-code/avent2021/shared"
6+
"strconv"
7+
)
8+
9+
func Part01(input []string) int {
10+
defer shared.Elapsed("day16 Part02")()
11+
12+
a := "D2FE28"
13+
// convert hex to int and print outputs
14+
if i, err := strconv.ParseInt(a, 16, 0); err != nil {
15+
fmt.Println(err)
16+
} else {
17+
// bin
18+
fmt.Print("Binary = ")
19+
fmt.Printf("%b\n", i)
20+
}
21+
22+
return 0
23+
}
24+
25+
func Part02(input []string) int {
26+
defer shared.Elapsed("day16 Part02")()
27+
28+
fmt.Println("HO HO HO!")
29+
30+
return 0
31+
}
32+

2021/day16/day16_test.go

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
package day16
2+
3+
import (
4+
"github.com/jvgrootveld/advent-of-code/avent2021/shared"
5+
"testing"
6+
)
7+
8+
type testResult struct {
9+
name string
10+
expected int
11+
}
12+
13+
func TestPart01(t *testing.T) {
14+
var tests = []testResult{
15+
{"example", -1},
16+
//{"input", -1},
17+
}
18+
19+
for _, test := range tests {
20+
test := test
21+
t.Run(test.name, func(t *testing.T) {
22+
t.Parallel()
23+
24+
content := shared.ReadFileAsStrings("data/" + test.name + ".txt")
25+
result := Part01(content)
26+
27+
t.Log("Result: ", result)
28+
if result != test.expected {
29+
t.Fatalf("Incorrect answer. Got '%v' expected '%v'", result, test.expected)
30+
}
31+
})
32+
}
33+
}
34+
35+
func TestPart02(t *testing.T) {
36+
var tests = []testResult{
37+
{"example", -1},
38+
//{"input", -1},
39+
}
40+
41+
for _, test := range tests {
42+
test := test
43+
t.Run(test.name, func(t *testing.T) {
44+
t.Parallel()
45+
46+
content := shared.ReadFileAsStrings("data/" + test.name + ".txt")
47+
result := Part02(content)
48+
49+
t.Log("Result: ", result)
50+
if result != test.expected {
51+
t.Fatalf("Incorrect answer. Got '%v' expected '%v'", result, test.expected)
52+
}
53+
})
54+
}
55+
}
56+

2022/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Advent of Code 2025
2-
My solutions to the [Advent of Code 2015](https://adventofcode.com/2015) puzzles.
1+
# Advent of Code 2022
2+
My solutions to the [Advent of Code 2022](https://adventofcode.com/2022) puzzles.
33

44
## Test
55

0 commit comments

Comments
 (0)