regression test cases for SharedPtr<>