added qunit test cases for all the functions

Joshua and Shuotian