Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamer committed Nov 7, 2022
1 parent 93de3f6 commit 90552f0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
2 changes: 0 additions & 2 deletions proto/ibc/applications/nft_transfer/v1/packet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ syntax = "proto3";

package ibc.applications.nft_transfer.v1;

import "gogoproto/gogo.proto";

option go_package = "github.com/bianjieai/nft-transfer/types";

// NonFungibleTokenPacketData defines a struct for the packet payload
Expand Down
28 changes: 24 additions & 4 deletions types/trace_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package types

import (
"reflect"
"testing"
)

Expand Down Expand Up @@ -31,6 +32,29 @@ func TestIsAwayFromOrigin(t *testing.T) {
}
}

func TestParseClassTrace(t *testing.T) {
type args struct {
rawClassID string
}
tests := []struct {
name string
args args
want ClassTrace
}{
{"native class", args{"kitty"}, ClassTrace{Path: "", BaseClassId: "kitty"}},
{"transfer to (p2,c2)", args{"p2/c2/kitty"}, ClassTrace{Path: "p2/c2", BaseClassId: "kitty"}},
{"transfer to (p4,c4)", args{"p4/c4/p2/c2/kitty"}, ClassTrace{Path: "p4/c4/p2/c2", BaseClassId: "kitty"}},
{"transfer to (p6,c6)", args{"p6/c6/p4/c4/p2/c2/kitty"}, ClassTrace{Path: "p6/c6/p4/c4/p2/c2", BaseClassId: "kitty"}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := ParseClassTrace(tt.args.rawClassID); !reflect.DeepEqual(got, tt.want) {
t.Errorf("ParseClassTrace() = %v, want %v", got, tt.want)
}
})
}
}

func TestClassTrace_GetFullClassPath(t *testing.T) {
tests := []struct {
name string
Expand All @@ -50,7 +74,3 @@ func TestClassTrace_GetFullClassPath(t *testing.T) {
})
}
}

func TestParseClassTrace(t *testing.T) {

}

0 comments on commit 90552f0

Please sign in to comment.