test.cpp to test exit for HS