mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 12:16:20 +08:00
test case
This commit is contained in:
parent
5bd003ebbe
commit
0eabe0231e
@ -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)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user