proto: add proto files for ibc unblock (#4853)

## Description

these proto files are meant to help unblock ibc in their quest of migrating the ibc module to proto.

Closes: #XXX
This commit is contained in:
Marko
2020-05-25 15:52:34 +00:00
committed by GitHub
parent 970cbbad6d
commit e03b61abd2
53 changed files with 6116 additions and 1006 deletions
+23
View File
@@ -265,3 +265,26 @@ func TestJSONMarshalUnmarshal(t *testing.T) {
})
}
}
func TestBitArrayProtoBuf(t *testing.T) {
testCases := []struct {
msg string
bA1 *BitArray
expPass bool
}{
{"success empty", &BitArray{}, true},
{"success", NewBitArray(1), true},
{"success", NewBitArray(2), true},
{"negative", NewBitArray(-1), false},
}
for _, tc := range testCases {
protoBA := tc.bA1.ToProto()
ba := new(BitArray)
ba.FromProto(protoBA)
if tc.expPass {
require.Equal(t, tc.bA1, ba, tc.msg)
} else {
require.NotEqual(t, tc.bA1, ba, tc.msg)
}
}
}