more tests & fix some uintmax_t corner case