[programmingPearls][chapter01] add a test code