test merging adjacent ranges in add_range