You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1006 B
52 lines
1006 B
package sign
|
|
|
|
import (
|
|
"crypto/ecdsa"
|
|
"github.com/fbsobreira/gotron-sdk/pkg/proto/core"
|
|
"reflect"
|
|
"testing"
|
|
)
|
|
|
|
func TestSignTransaction(t *testing.T) {
|
|
type args struct {
|
|
transaction *core.Transaction
|
|
privateKey string
|
|
}
|
|
tests := []struct {
|
|
name string
|
|
args args
|
|
want *core.Transaction
|
|
wantErr bool
|
|
}{
|
|
// TODO: Add test cases.
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
got, err := SignTransaction(tt.args.transaction, tt.args.privateKey)
|
|
if (err != nil) != tt.wantErr {
|
|
t.Errorf("SignTransaction() error = %v, wantErr %v", err, tt.wantErr)
|
|
return
|
|
}
|
|
if !reflect.DeepEqual(got, tt.want) {
|
|
t.Errorf("SignTransaction() got = %v, want %v", got, tt.want)
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
func Test_zeroKey(t *testing.T) {
|
|
type args struct {
|
|
k *ecdsa.PrivateKey
|
|
}
|
|
tests := []struct {
|
|
name string
|
|
args args
|
|
}{
|
|
// TODO: Add test cases.
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
zeroKey(tt.args.k)
|
|
})
|
|
}
|
|
}
|
|
|