constructor test case for named function