Added test for thread functions.

7 files changed