30 lines
508 B
Go
30 lines
508 B
Go
|
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)
|
||
|
}
|