add test for inheritance of constructor functions