The core protocol of WoopChain
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.
woop/utils/utils_test.go

15 lines
303 B

package utils
import "testing"
func TestConvertFixedDataIntoByteArray(t *testing.T) {
res := ConvertFixedDataIntoByteArray(int16(3))
if len(res) != 2 {
t.Errorf("Conversion incorrect.")
}
res = ConvertFixedDataIntoByteArray(int32(3))
if len(res) != 4 {
t.Errorf("Conversion incorrect.")
}
}