kind checking moved to top-level functions on kinds.go

This commit is contained in:
fiatjaf
2024-11-03 15:34:49 -03:00
parent 99c3765092
commit 1d06176c7e
4 changed files with 35 additions and 33 deletions

19
kinds_test.go Normal file
View File

@@ -0,0 +1,19 @@
package nostr
import (
"testing"
"github.com/stretchr/testify/require"
)
func KindKindTest(t *testing.T) {
require.True(t, IsRegularKind(1))
require.True(t, IsRegularKind(9))
require.True(t, IsRegularKind(1111))
require.True(t, IsReplaceableKind(0))
require.True(t, IsReplaceableKind(3))
require.True(t, IsReplaceableKind(10002))
require.True(t, IsReplaceableKind(10050))
require.True(t, IsAddressableKind(30023))
require.True(t, IsAddressableKind(39000))
}