github.com/cycloss/advent-of-code@v0.0.0-20221210145555-15039b95faa6/2022/test/aoc2022_test.go (about) 1 package test 2 3 import ( 4 "fmt" 5 "log" 6 "os" 7 "path" 8 "testing" 9 10 "github.com/cycloss/advent-of-code/2022/lib" 11 ) 12 13 func init() { 14 // change to previous directory as directory will be the test dir to start with 15 cwd, err := os.Getwd() 16 if err != nil { 17 log.Fatal(err) 18 } 19 fmt.Println(cwd) 20 err = os.Chdir(path.Dir(cwd)) 21 if err != nil { 22 log.Fatal(err) 23 } 24 } 25 26 func TestPlayground(t *testing.T) { 27 fmt.Println(3 / 2) 28 } 29 30 func TestDay10(t *testing.T) { 31 lib.Day10() 32 }