1313
1414TEST_CASE (" it's good if input data is ordered" , " [NoDB]" )
1515{
16- type_id_version const tiv1{osmium::item_type::node, 1 , 1 };
17- type_id_version const tiv2{osmium::item_type::node, 1 , 2 };
18- type_id_version const tiv3{osmium::item_type::node, 2 , 1 };
19- type_id_version const tiv4{osmium::item_type::way, 1 , 1 };
20- type_id_version const tiv5{osmium::item_type::way, 2 , 1 };
21- type_id_version const tiv6{osmium::item_type::relation, 1 , 1 };
22- type_id_version const tiv7{osmium::item_type::relation, 1 , 2 };
16+ type_id const tiv1{osmium::item_type::node, 1 };
17+ type_id const tiv2{osmium::item_type::node, 2 };
18+ type_id const tiv3{osmium::item_type::way, 1 };
19+ type_id const tiv4{osmium::item_type::way, 2 };
20+ type_id const tiv5{osmium::item_type::relation, 1 };
21+ type_id const tiv6{osmium::item_type::relation, 2 };
2322
2423 REQUIRE_NOTHROW (check_input (tiv1, tiv2));
2524 REQUIRE_NOTHROW (check_input (tiv2, tiv3));
2625 REQUIRE_NOTHROW (check_input (tiv3, tiv4));
2726 REQUIRE_NOTHROW (check_input (tiv4, tiv5));
2827 REQUIRE_NOTHROW (check_input (tiv5, tiv6));
29- REQUIRE_NOTHROW (check_input (tiv6, tiv7));
3028}
3129
3230TEST_CASE (" negative OSM object ids are not allowed" , " [NoDB]" )
3331{
34- type_id_version const tivn{osmium::item_type::node, -17 , 1 };
35- type_id_version const tivw{osmium::item_type::way, -1 , 1 };
36- type_id_version const tivr{osmium::item_type::relation, -999 , 17 };
32+ type_id const tivn{osmium::item_type::node, -17 };
33+ type_id const tivw{osmium::item_type::way, -1 };
34+ type_id const tivr{osmium::item_type::relation, -999 };
3735
3836 REQUIRE_THROWS_WITH (
3937 check_input (tivn, tivn),
@@ -47,18 +45,18 @@ TEST_CASE("negative OSM object ids are not allowed", "[NoDB]")
4745
4846TEST_CASE (" objects of the same type must be ordered" , " [NoDB]" )
4947{
50- type_id_version const tiv1{osmium::item_type::node, 42 , 1 };
51- type_id_version const tiv2{osmium::item_type::node, 3 , 1 };
48+ type_id const tiv1{osmium::item_type::node, 42 };
49+ type_id const tiv2{osmium::item_type::node, 3 };
5250
5351 REQUIRE_THROWS_WITH (check_input (tiv1, tiv2),
5452 " Input data is not ordered: node id 3 after 42." );
5553}
5654
5755TEST_CASE (" a node after a way or relation is not allowed" , " [NoDB]" )
5856{
59- type_id_version const tiv1w{osmium::item_type::way, 42 , 1 };
60- type_id_version const tiv1r{osmium::item_type::relation, 42 , 1 };
61- type_id_version const tiv2{osmium::item_type::node, 100 , 1 };
57+ type_id const tiv1w{osmium::item_type::way, 42 };
58+ type_id const tiv1r{osmium::item_type::relation, 42 };
59+ type_id const tiv2{osmium::item_type::node, 100 };
6260
6361 REQUIRE_THROWS_WITH (check_input (tiv1w, tiv2),
6462 " Input data is not ordered: node after way." );
@@ -68,20 +66,20 @@ TEST_CASE("a node after a way or relation is not allowed", "[NoDB]")
6866
6967TEST_CASE (" a way after a relation is not allowed" , " [NoDB]" )
7068{
71- type_id_version const tiv1{osmium::item_type::relation, 42 , 1 };
72- type_id_version const tiv2{osmium::item_type::way, 100 , 1 };
69+ type_id const tiv1{osmium::item_type::relation, 42 };
70+ type_id const tiv2{osmium::item_type::way, 100 };
7371
7472 REQUIRE_THROWS_WITH (check_input (tiv1, tiv2),
7573 " Input data is not ordered: way after relation." );
7674}
7775
78- TEST_CASE (" versions must be ordered " , " [NoDB]" )
76+ TEST_CASE (" no object may appear twice " , " [NoDB]" )
7977{
80- type_id_version const tiv1{osmium::item_type::way, 42 , 2 };
81- type_id_version const tiv2{osmium::item_type::way, 42 , 1 };
78+ type_id const tiv1{osmium::item_type::way, 42 };
79+ type_id const tiv2{osmium::item_type::way, 42 };
8280
8381 REQUIRE_THROWS_WITH (
8482 check_input (tiv1, tiv2),
85- " Input data is not ordered: way id 42 version 1 after 2 ." );
83+ " Input data is not ordered: way id 42 appears more than once ." );
8684}
8785
0 commit comments