github.com/mattn/anko@v0.1.10/core/testdata/testing.ank (about) 1 2 var runtime = import("runtime") 3 var regexp = import("regexp") 4 5 func is(expect, got, name) { 6 if expect != got { 7 panic("is - received: " + toString(got) + " - expected: " + toString(expect) + " - for: " + toString(name)) 8 } 9 } 10 11 func ok(expect, name) { 12 if !expect { 13 panic("ok - received: " + toString(expect) + " - for: " + toString(name)) 14 } 15 } 16 17 func go18later() { 18 return regexp.MustCompile("^go1\\.(1[0-9]|[8-9])\\.[0-9]$").MatchString(runtime.Version()) 19 }