Add unit tests covering length conversions