mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-11-11 02:35:18 +00:00
19 lines
563 B
Go
19 lines
563 B
Go
package libp2ptls
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestExtensionGenerating(t *testing.T) {
|
|
require.Equal(t, []int{1, 3, 6, 1, 4, 1, 53594, 13, 37}, getPrefixedExtensionID([]int{13, 37}))
|
|
}
|
|
|
|
func TestExtensionComparison(t *testing.T) {
|
|
require.True(t, extensionIDEqual([]int{1, 2, 3, 4}, []int{1, 2, 3, 4}))
|
|
require.False(t, extensionIDEqual([]int{1, 2, 3, 4}, []int{1, 2, 3}))
|
|
require.False(t, extensionIDEqual([]int{1, 2, 3}, []int{1, 2, 3, 4}))
|
|
require.False(t, extensionIDEqual([]int{1, 2, 3, 4}, []int{4, 3, 2, 1}))
|
|
}
|