diff --git a/sm4/arm64_verify_test.go b/sm4/arm64_verify_test.go index c091871..58a8c9a 100644 --- a/sm4/arm64_verify_test.go +++ b/sm4/arm64_verify_test.go @@ -6,5 +6,11 @@ func tblAsm(in, imm, out *byte) func TestTblAsm(t *testing.T) { in := []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + imm := []byte{15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0} + out := make([]byte, 16) + tblAsm(&in[0], &imm[0], &out[0]) + if !reflect.DeepEqual(out, imm) { + t.Errorf("expected=%v, result=%v\n", imm, out) + } } \ No newline at end of file