mirror of
https://github.com/luxfi/sdk.git
synced 2026-10-30 15:19:23 +00:00
Lux Partners Limited is not the entity behind this work. Every place the old name stood — copyright lines, site footers, brand config, legal and compliance text — now names the company that actually holds it. lux.fund is the exception and is not renamed to match: that site belongs to Lux Assets Management LLC, a different company, and it says so. Two kinds of line were left for a person rather than rewritten. A dated news item recording that Lux Partners Limited was established in the Isle of Man is a historical fact, and renaming it would falsify the record. And a sentence asserting that the company is domiciled in the Isle of Man is a claim about a jurisdiction, not a name — an Inc or an LLC is not an Isle of Man company, so swapping the name there would assert something untrue. Co-authored-by: Hanzo Dev <[email protected]>
41 lines
928 B
Go
41 lines
928 B
Go
// Copyright (C) 2022, Lux Industries Inc All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
//go:build skip
|
|
|
|
package prompts
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/luxfi/crypto"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestContains(t *testing.T) {
|
|
require := require.New(t)
|
|
strList := []string{"test", "capture", "list"}
|
|
|
|
k1, _ := crypto.GenerateKey()
|
|
k2, _ := crypto.GenerateKey()
|
|
k3, _ := crypto.GenerateKey()
|
|
|
|
addr1 := crypto.PubkeyToAddress(k1.PublicKey)
|
|
addr2 := crypto.PubkeyToAddress(k2.PublicKey)
|
|
addr3 := crypto.PubkeyToAddress(k3.PublicKey)
|
|
|
|
addrList := []crypto.Address{
|
|
addr1,
|
|
addr2,
|
|
}
|
|
|
|
require.True(contains(strList, "test"))
|
|
require.True(contains(strList, "capture"))
|
|
require.True(contains(strList, "list"))
|
|
require.False(contains(strList, "false"))
|
|
|
|
require.True(contains(addrList, addr1))
|
|
require.True(contains(addrList, addr2))
|
|
require.False(contains(addrList, addr3))
|
|
}
|