added test for genCharMap