add test for scope guard and smart assert