added test cases for utils->sw.py