re-organise repo
This commit is contained in:
43
2022/go/day01/day01_test.go
Normal file
43
2022/go/day01/day01_test.go
Normal file
@@ -0,0 +1,43 @@
|
||||
package day01
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPart1(t *testing.T) {
|
||||
r := Part1(`1000
|
||||
2000
|
||||
3000
|
||||
|
||||
4000
|
||||
|
||||
5000
|
||||
6000
|
||||
|
||||
7000
|
||||
8000
|
||||
9000
|
||||
|
||||
10000`)
|
||||
assert.Equal(t, 24000, r)
|
||||
}
|
||||
|
||||
func TestPart2(t *testing.T) {
|
||||
r := Part2(`1000
|
||||
2000
|
||||
3000
|
||||
|
||||
4000
|
||||
|
||||
5000
|
||||
6000
|
||||
|
||||
7000
|
||||
8000
|
||||
9000
|
||||
|
||||
10000`)
|
||||
assert.Equal(t, 45000, r)
|
||||
}
|
||||
Reference in New Issue
Block a user