Build tests in makefile
Add code for Issue #1
Fix the test function to set stype to a non-zero value.