test cases for map and stack. Adopted from Princeton.