edits to fix go_vet errors
This commit is contained in:
parent
3478a4e421
commit
6f4e8b7236
@ -116,13 +116,13 @@ func TestMixColumns(t *testing.T) {
|
|||||||
0x8e, 0x9f, 0x4d, 0x01,
|
0x8e, 0x9f, 0x4d, 0x01,
|
||||||
0x4d, 0xdc, 0x7e, 0x01,
|
0x4d, 0xdc, 0x7e, 0x01,
|
||||||
0xa1, 0x58, 0xbd, 0x01,
|
0xa1, 0x58, 0xbd, 0x01,
|
||||||
0xbc, 0x9d, 0xf8, 0x01,
|
0xbc, 0x9d, 0xf8, 0x02,
|
||||||
}
|
}
|
||||||
actual := MixColumns(input)
|
actual := MixColumns(input)
|
||||||
for i := 0; i < 16; i++ {
|
for i := 0; i < 16; i++ {
|
||||||
if actual[i] != expected[i] {
|
if actual[i] != expected[i] {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
"failed to get MixColumn:\n\texpected:", expected, "\n\tactual:", actual,
|
"failed to get MixColumn:\n\texpected: %v \n\tactual: %v", expected, actual,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ func TestCipher(t *testing.T) {
|
|||||||
for i := 0; i < 16; i++ {
|
for i := 0; i < 16; i++ {
|
||||||
if actual[i] != expected[i] {
|
if actual[i] != expected[i] {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
"failed to get Cipher:\n\texpected:", expected, "\n\tactual:", actual,
|
"failed to get Cipher:\n\texpected: %v\n\tactual: %v", expected, actual,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -180,7 +180,7 @@ func TestCipher(t *testing.T) {
|
|||||||
for i := 0; i < 16; i++ {
|
for i := 0; i < 16; i++ {
|
||||||
if actual[i] != expected[i] {
|
if actual[i] != expected[i] {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
"failed to get Cipher:\n\texpected:", expected, "\n\tactual:", actual,
|
"failed to get Cipher:\n\texpected: %v\n\tactual: %v", expected, actual,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -208,7 +208,7 @@ func TestCipher(t *testing.T) {
|
|||||||
for i := 0; i < 16; i++ {
|
for i := 0; i < 16; i++ {
|
||||||
if actual[i] != expected[i] {
|
if actual[i] != expected[i] {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
"failed to get Cipher:\n\texpected:", expected, "\n\tactual:", actual,
|
"failed to get Cipher:\n\texpected: %v\n\tactual: %v", expected, actual,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -236,7 +236,7 @@ func TestCipher(t *testing.T) {
|
|||||||
for i := 0; i < 16; i++ {
|
for i := 0; i < 16; i++ {
|
||||||
if actual[i] != expected[i] {
|
if actual[i] != expected[i] {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
"failed to get Cipher:\n\texpected:", expected, "\n\tactual:", actual,
|
"failed to get Cipher:\n\texpected: %v\n\tactual: %v", expected, actual,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ func TestInvCipher(t *testing.T) {
|
|||||||
for i := 0; i < 16; i++ {
|
for i := 0; i < 16; i++ {
|
||||||
if actual[i] != expected[i] {
|
if actual[i] != expected[i] {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
"failed to get Cipher:\n\texpected:", expected, "\n\tactual:", actual,
|
"failed to get Cipher:\n\texpected: %v\n\tactual: %v", expected, actual,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -293,7 +293,7 @@ func TestInvCipher(t *testing.T) {
|
|||||||
for i := 0; i < 16; i++ {
|
for i := 0; i < 16; i++ {
|
||||||
if actual[i] != expected[i] {
|
if actual[i] != expected[i] {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
"failed to get Cipher:\n\texpected:", expected, "\n\tactual:", actual,
|
"failed to get Cipher:\n\texpected: %v\n\tactual: %v", expected, actual,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -321,7 +321,7 @@ func TestInvCipher(t *testing.T) {
|
|||||||
for i := 0; i < 16; i++ {
|
for i := 0; i < 16; i++ {
|
||||||
if actual[i] != expected[i] {
|
if actual[i] != expected[i] {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
"failed to get Cipher:\n\texpected:", expected, "\n\tactual:", actual,
|
"failed to get Cipher:\n\texpected: %v \n\tactual:%v", expected, actual,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -349,7 +349,7 @@ func TestInvCipher(t *testing.T) {
|
|||||||
for i := 0; i < 16; i++ {
|
for i := 0; i < 16; i++ {
|
||||||
if actual[i] != expected[i] {
|
if actual[i] != expected[i] {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
"failed to get Cipher:\n\texpected:", expected, "\n\tactual:", actual,
|
"failed to get Cipher:\n\texpected: %v\n\tactual: %v", expected, actual,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ func TestTransposeRandom(t *testing.T) {
|
|||||||
actual := TransposeSplit(input)
|
actual := TransposeSplit(input)
|
||||||
if input == actual {
|
if input == actual {
|
||||||
t.Errorf(
|
t.Errorf(
|
||||||
"failed TransposeRandom:\n\texpected: something random\n\t actual: % q",
|
"failed TransposeRandom:\n\texpected: something random % q\n\t actual: % q",
|
||||||
input,
|
input,
|
||||||
actual,
|
actual,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user