test-lua-speed/lua-speed_test.go

21 lines
369 B
Go
Raw Permalink Normal View History

2024-11-13 20:00:48 +00:00
package lua_speed
import (
"github.com/negrel/assert"
"testing"
)
func TestFibonacciLua(t *testing.T) {
L := FibonacciLuaInit()
for _, i := range fibonacciNumbers {
assert.Equal(i[0], FibonacciLuaRun(L, i[1]))
}
}
func BenchmarkFibonacciLuaRun(b *testing.B) {
L := FibonacciLuaInit()
for i := 0; i < b.N; i++ {
_ = FibonacciLuaRun(L, 83)
}
}