use length_type for min_size and max_size in formats
fix a test case for MinGW