package registry_test

import (
	. "flow/internal/check"
	"flow/registry"
	"testing"
)

func TestRegister(t *testing.T) {
	exp := Expect(t)
	r := registry.New()
	{
		e := r.Register("func", func(a, b int) int { return 0 })
		exp.NotErr(e.Err())
	}
	{
		e := r.Register("func", func(a int) int { return 0 })
		exp.NotErr(e.Err())
	}
	{
		e := r.Register("func", func(a int) {})
		exp.Err(e.Err())
	}

}
