hackathon/question/q01_test.go

30 lines
508 B
Go

2021-12-20 13:00:56 +07:00
package question
import (
"fmt"
"strings"
"testing"
"github.com/hhhapz/codequest/models"
)
func TestQ01(t *testing.T) {
u := &models.User{
ID: "0",
}
q := QuestionByID("directions")
input := q.Generate(u)
fmt.Println("STAAART")
x, y := q1P1(strings.Split(input, "\n"))
fmt.Println("STAAART")
t.Logf("SOLUTION (P1): (%d, %d): %d", x, y, q1Total(x, y))
x, y = q1P2(strings.Split(input, "\n"))
t.Logf("SOLUTION (P2): (%d, %d): %d", x, y, q1Total(x, y))
fmt.Printf("INPUT: %v", input)
}