ag/templates/_main_test.go

15 lines
253 B
Go
Raw Normal View History

2024-03-15 22:32:19 +08:00
package main_test
import (
"apigo.cloud/git/apigo/gojs"
"github.com/ssgo/u"
"testing"
)
func TestPlusNumber(t *testing.T) {
r, err, _ := gojs.Run("return 1+2", nil)
if err != nil || u.Int(r) != 3 {
t.Fatal("TestPlusNumber failed", r, err)
}
}