Skip to content

Commit

Permalink
test(schema): add failing tests for special chars
Browse files Browse the repository at this point in the history
  • Loading branch information
0xankit committed Dec 6, 2022
1 parent 744112b commit 790452b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions schema/data/utilities/string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ func TestReadData(t *testing.T) {
{"Dec Data", args{"D|100"}, base.NewDecData(types.NewDec(100)), false},
{"Bool Data", args{"B|true"}, base.NewBooleanData(true), false},
{"AccAddress data", args{"A|cosmos1pkkayn066msg6kn33wnl5srhdt3tnu2vzasz9c"}, base.NewAccAddressData(fromAccAddress), false},
{"String Data", args{"S|S,|newFact"}, base.NewStringData("S,|newFact"), true},
{"List Data String", args{"L|S|,TestData,S|,Test"}, base.NewListData(baseLists.NewDataList([]data.Data{base.NewStringData("S|,TestData"), base.NewStringData("S|,Test")}...)), true},
}

for _, tt := range tests {
Expand Down
4 changes: 2 additions & 2 deletions schema/ids/base/stringID_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ func TestNewStringID(t *testing.T) {
args args
want ids.StringID
}{

{"+ve", args{"ID"}, NewStringID("ID")},
{"+ve", args{"ID"}, stringID{"ID"}},
{"+ve", args{"S|ID"}, stringID{"S|ID"}}, //TODO: It should fail
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 790452b

Please sign in to comment.