basic unit test cases for ip function