36 lines
616 B
Go

package main_test
import (
"testing"
"git.akyoto.dev/cli/q/src/build"
"git.akyoto.dev/go/assert"
)
func BenchmarkEmpty(b *testing.B) {
compiler := build.New("tests/benchmarks/empty.q")
for i := 0; i < b.N; i++ {
_, err := compiler.Run()
assert.Nil(b, err)
}
}
func BenchmarkExpressions(b *testing.B) {
compiler := build.New("tests/benchmarks/expressions.q")
for i := 0; i < b.N; i++ {
_, err := compiler.Run()
assert.Nil(b, err)
}
}
func BenchmarkHello(b *testing.B) {
compiler := build.New("examples/hello")
for i := 0; i < b.N; i++ {
_, err := compiler.Run()
assert.Nil(b, err)
}
}