mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-07-01 02:51:24 +02:00
remove simdjson because sonic is just better.
This commit is contained in:
@ -5,7 +5,6 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/minio/simdjson-go"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@ -126,28 +125,6 @@ func TestParseMessage(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("simdjson", func(t *testing.T) {
|
||||
smp := SIMDMessageParser{AuxIter: &simdjson.Iter{}}
|
||||
for _, testCase := range testCases {
|
||||
t.Run(testCase.Name, func(t *testing.T) {
|
||||
envelope, err := smp.ParseMessage(testCase.Message)
|
||||
|
||||
if testCase.ExpectedEnvelope == nil && envelope == nil {
|
||||
return
|
||||
}
|
||||
|
||||
if testCase.ExpectedEnvelope == nil {
|
||||
require.Nil(t, envelope, "expected nil but got %v", envelope)
|
||||
return
|
||||
}
|
||||
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, envelope, "expected non-nil envelope but got nil")
|
||||
require.Equal(t, testCase.ExpectedEnvelope.String(), envelope.String())
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("sonic", func(t *testing.T) {
|
||||
smp := NewSonicMessageParser()
|
||||
|
||||
|
Reference in New Issue
Block a user