add testandset test
Merge pull request #143 from xiangli-cmu/master

add testandset test