Modify 'tokens' can compare tokens properly

add argument ‘tokenEquals’
Add test for 'tokens'