Skip to content

Commit

Permalink
More concise syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
mmd-osm committed Nov 24, 2023
1 parent 923a2ac commit 70ca240
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions test/test_apidb_backend_nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,8 @@ void test_single_nodes(test_database &tdb) {
throw std::runtime_error("Node 2 should be visible, but isn't");
}

std::vector<osm_nwr_id_t> ids;
ids.push_back(1);
ids.push_back(2);
ids.push_back(3);
ids.push_back(4);
std::vector<osm_nwr_id_t> ids{1,2,3,4};

if (sel->select_nodes(ids) != 4) {
throw std::runtime_error("Selecting 4 nodes failed");
}
Expand Down Expand Up @@ -138,10 +135,8 @@ void test_dup_nodes(test_database &tdb) {
throw std::runtime_error("Node 1 should be visible, but isn't");
}

std::vector<osm_nwr_id_t> ids;
ids.push_back(1);
ids.push_back(1);
ids.push_back(1);
std::vector<osm_nwr_id_t> ids{1,1,1};

if (sel->select_nodes(ids) != 1) {
throw std::runtime_error("Selecting 3 duplicates of 1 node failed");
}
Expand Down

0 comments on commit 70ca240

Please sign in to comment.