fix: fix bug that access to outside a memory boundary.
add: tests/* files has been added.