Tests for 'add_missing_dims'.