Added some tests for functions.
Merge pull request #3 from h4cc/master

Added some tests for functions.