diff --git a/tests/unit/active/test_active_send_large.cc b/tests/unit/active/test_active_send_large.cc index 7833fd87a5..25ac33b187 100644 --- a/tests/unit/active/test_active_send_large.cc +++ b/tests/unit/active/test_active_send_large.cc @@ -91,7 +91,7 @@ template void checkMsg(T msg) { auto arr = reinterpret_cast(&msg->payload[0]); for (std::size_t i = 0; i < msg->bytes / sizeof(int64_t); i++) { - EXPECT_EQ(arr[i], i); + EXPECT_EQ(arr[i], static_cast(i)); } } diff --git a/tests/unit/collection/test_checkpoint.extended.cc b/tests/unit/collection/test_checkpoint.extended.cc index ff76861d5f..537031e33f 100644 --- a/tests/unit/collection/test_checkpoint.extended.cc +++ b/tests/unit/collection/test_checkpoint.extended.cc @@ -242,7 +242,7 @@ TEST_F(TestCheckpoint, test_checkpoint_1) { }); // Ensure that all elements were properly destroyed - EXPECT_EQ(counter, 0); + EXPECT_EQ(counter, 0ull); } } @@ -315,7 +315,7 @@ TEST_F(TestCheckpoint, test_checkpoint_in_place_2) { }); // Ensure that all elements were properly destroyed - EXPECT_EQ(counter, 0); + EXPECT_EQ(counter, 0ull); } TEST_F(TestCheckpoint, test_checkpoint_in_place_3) { @@ -425,7 +425,7 @@ TEST_F(TestCheckpoint, test_checkpoint_no_elements_on_root_rank) { //verify that root node has no elements, by construction with map if(this_node == 0) { auto local_set = theCollection()->getLocalIndices(proxy); - EXPECT_EQ(local_set.size(), 0); + EXPECT_EQ(local_set.size(), 0ull); } vt_print(gen, "checkpointToFile\n"); diff --git a/tests/unit/collection/test_lb.extended.cc b/tests/unit/collection/test_lb.extended.cc index bb92395840..e92d3fc96d 100644 --- a/tests/unit/collection/test_lb.extended.cc +++ b/tests/unit/collection/test_lb.extended.cc @@ -178,7 +178,7 @@ TEST_F(TestLoadBalancerOther, test_make_graph_symmetric) { auto const phase = thePhase()->getCurrentPhase(); auto const comm_data = theNodeLBData()->getNodeComm(phase); ASSERT_NE(comm_data, nullptr); - ASSERT_EQ(comm_data->size(), 1); + ASSERT_EQ(comm_data->size(), 1ull); // test auto proxy = theLBManager()->makeLB(); @@ -190,11 +190,11 @@ TEST_F(TestLoadBalancerOther, test_make_graph_symmetric) { // assert if (num_nodes == 1) { - ASSERT_EQ(comm_data->size(), 1); + ASSERT_EQ(comm_data->size(), 1ull); return; } - ASSERT_EQ(comm_data->size(), 2); + ASSERT_EQ(comm_data->size(), 2ull); auto const prev_node = (this_node + num_nodes - 1) % num_nodes; bool this_to_next = false, prev_to_this = false; @@ -423,7 +423,7 @@ TEST_P(TestNodeLBDataDumper, test_node_lb_data_dumping_with_interval) { auto& json = *json_ptr; EXPECT_TRUE(json.find("phases") != json.end()); - EXPECT_EQ(json["phases"].size(), num_phases); + EXPECT_EQ(json["phases"].size(), static_cast(num_phases)); }); if (vt::theContext()->getNode() == 0) { diff --git a/tests/unit/collection/test_lb_data_holder.cc b/tests/unit/collection/test_lb_data_holder.cc index 9b2bec90c5..8d7cdc6134 100644 --- a/tests/unit/collection/test_lb_data_holder.cc +++ b/tests/unit/collection/test_lb_data_holder.cc @@ -97,7 +97,7 @@ TEST_F(TestOptionalPhasesMetadata, test_no_metadata) { addPhasesDataToJson(json, num_phases, {}); LBDataHolder testObj(json); - EXPECT_EQ(testObj.count_, num_phases); + EXPECT_EQ(testObj.count_, static_cast(num_phases)); std::set expectedSkipped = {}; EXPECT_EQ(testObj.skipped_phases_, expectedSkipped); std::set expectedIdentical = {}; @@ -126,7 +126,7 @@ TEST_F(TestOptionalPhasesMetadata, test_no_lb_phases_metadata) { addPhasesDataToJson(json, num_phases, {}); LBDataHolder testObj(json); - EXPECT_EQ(testObj.count_, num_phases); + EXPECT_EQ(testObj.count_, static_cast(num_phases)); std::set expectedSkipped = {}; EXPECT_EQ(testObj.skipped_phases_, expectedSkipped); std::set expectedIdentical = {}; @@ -162,7 +162,7 @@ TEST_F(TestOptionalPhasesMetadata, test_lb_phases_metadata_empty) { addPhasesDataToJson(json, num_phases, {}); LBDataHolder testObj(json); - EXPECT_EQ(testObj.count_, num_phases); + EXPECT_EQ(testObj.count_, static_cast(num_phases)); std::set expectedSkipped = {}; EXPECT_EQ(testObj.skipped_phases_, expectedSkipped); std::set expectedIdentical = {}; @@ -198,7 +198,7 @@ TEST_F(TestOptionalPhasesMetadata, test_lb_phases_metadata_filled) { addPhasesDataToJson(json, num_phases, {1,2,3,4,8,9}); LBDataHolder testObj(json); - EXPECT_EQ(testObj.count_, num_phases); + EXPECT_EQ(testObj.count_, static_cast(num_phases)); std::set expectedSkipped = {2, 3, 4}; EXPECT_EQ(testObj.skipped_phases_, expectedSkipped); std::set expectedIdentical = {1, 8, 9}; diff --git a/tests/unit/collection/test_model_select_subphases.nompi.cc b/tests/unit/collection/test_model_select_subphases.nompi.cc index dc97d55528..53790db9bb 100644 --- a/tests/unit/collection/test_model_select_subphases.nompi.cc +++ b/tests/unit/collection/test_model_select_subphases.nompi.cc @@ -122,7 +122,7 @@ TEST_F(TestModelSelectSubphases, test_model_select_subphases_1) { auto test_model = std::make_shared(std::make_shared(), subphases); - EXPECT_EQ(test_model->getNumSubphases(), subphases.size()); + EXPECT_EQ(test_model->getNumSubphases(), static_cast(subphases.size())); test_model->setLoads(&proc_load, nullptr); test_model->updateLoads(0); @@ -171,7 +171,7 @@ TEST_F(TestModelSelectSubphases, test_model_select_subphases_2) { auto test_model = std::make_shared(std::make_shared(), subphases); - EXPECT_EQ(test_model->getNumSubphases(), subphases.size()); + EXPECT_EQ(test_model->getNumSubphases(), static_cast(subphases.size())); test_model->setLoads(&proc_load, nullptr); test_model->updateLoads(0); diff --git a/tests/unit/lb/test_lb_data_comm.cc b/tests/unit/lb/test_lb_data_comm.cc index fbc2b42d34..6ca958cec6 100644 --- a/tests/unit/lb/test_lb_data_comm.cc +++ b/tests/unit/lb/test_lb_data_comm.cc @@ -300,7 +300,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_col_to_col_send) { EXPECT_TRUE(key.from_.isMigratable()); EXPECT_EQ(key.from_.id, idxToElmID(prev_idx)); EXPECT_EQ(vol.bytes, sizeof(MyMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -365,7 +365,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_col_to_objgroup_send) { EXPECT_FALSE(key.to_.isMigratable()); EXPECT_EQ(key.to_.id, idb); EXPECT_EQ(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -428,7 +428,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_objgroup_to_col_send) { EXPECT_FALSE(key.from_.isMigratable()); EXPECT_EQ(key.from_.id, vt::elm::ElmIDBits::createObjGroup(op, prev).id); EXPECT_EQ(vol.bytes, sizeof(MyMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -482,7 +482,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_objgroup_to_objgroup_send) { EXPECT_FALSE(key.from_.isMigratable()); EXPECT_EQ(key.to_.id, idb); EXPECT_EQ(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -539,7 +539,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_handler_to_col_send) { EXPECT_FALSE(key.from_.isMigratable()); EXPECT_EQ(key.from_.id, vt::elm::ElmIDBits::createBareHandler(prev).id); EXPECT_EQ(vol.bytes, sizeof(MyMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -600,7 +600,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_col_to_handler_send) { EXPECT_FALSE(key.to_.isMigratable()); EXPECT_EQ(key.to_.id, vt::elm::ElmIDBits::createBareHandler(next).id); EXPECT_EQ(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -647,7 +647,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_objgroup_to_handler_send) { EXPECT_EQ(key.to_.id, vt::elm::ElmIDBits::createBareHandler(next).id); EXPECT_FALSE(key.from_.isMigratable()); EXPECT_EQ(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -692,7 +692,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_handler_to_objgroup_send) { EXPECT_EQ(key.from_.id, vt::elm::ElmIDBits::createBareHandler(this_node).id); EXPECT_FALSE(key.from_.isMigratable()); EXPECT_EQ(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -732,7 +732,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_handler_to_handler_send) { EXPECT_FALSE(key.to_.isMigratable()); EXPECT_FALSE(key.from_.isMigratable()); EXPECT_GE(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_GE(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } diff --git a/tests/unit/lb/test_lb_reader.nompi.cc b/tests/unit/lb/test_lb_reader.nompi.cc index 3451bab7a7..5929769f64 100644 --- a/tests/unit/lb/test_lb_reader.nompi.cc +++ b/tests/unit/lb/test_lb_reader.nompi.cc @@ -67,8 +67,8 @@ TEST_F(TestLBReader, test_lb_read_1) { Config::openConfig(file_name); EXPECT_EQ(Config::numEntries(), 3); - EXPECT_EQ(Config::getExactEntries().size(), 2); - EXPECT_EQ(Config::getModEntries().size(), 1); + EXPECT_EQ(Config::getExactEntries().size(), 2u); + EXPECT_EQ(Config::getModEntries().size(), 1u); for (ConfigIdx i = 0; i < 21; i++) { auto entry = Config::entry(i); diff --git a/tests/unit/objgroup/test_objgroup.cc b/tests/unit/objgroup/test_objgroup.cc index 102217b942..1d8646c814 100644 --- a/tests/unit/objgroup/test_objgroup.cc +++ b/tests/unit/objgroup/test_objgroup.cc @@ -79,7 +79,7 @@ struct TestObjGroup : TestParallelHarness { void verifyVec(VectorPayload vec) { auto final_size = vec.vec_.size(); auto n = vt::theContext()->getNumNodes(); - EXPECT_EQ(final_size, n); + EXPECT_EQ(final_size, static_cast(n)); total_verify_expected_++; } }; diff --git a/tests/unit/phase/test_phase_management.cc b/tests/unit/phase/test_phase_management.cc index 98f7baf147..a32ca0513e 100644 --- a/tests/unit/phase/test_phase_management.cc +++ b/tests/unit/phase/test_phase_management.cc @@ -55,7 +55,7 @@ TEST_F(TestPhaseManagement, test_phase_manager_1) { auto phase_mgr = phase::PhaseManager::construct(); // start with phase 0 - EXPECT_EQ(phase_mgr->getCurrentPhase(), 0); + EXPECT_EQ(phase_mgr->getCurrentPhase(), 0ull); int start_hooks = 0; int end_hooks = 0; @@ -97,13 +97,13 @@ TEST_F(TestPhaseManagement, test_phase_manager_1) { EXPECT_EQ(start_hooks, 3); EXPECT_EQ(end_hooks, 1); EXPECT_EQ(end_post_hooks, 1); - EXPECT_EQ(phase_mgr->getCurrentPhase(), 1); + EXPECT_EQ(phase_mgr->getCurrentPhase(), 1ull); phase_mgr->nextPhaseCollective(); EXPECT_EQ(start_hooks, 4); EXPECT_EQ(end_hooks, 2); EXPECT_EQ(end_post_hooks, 2); - EXPECT_EQ(phase_mgr->getCurrentPhase(), 2); + EXPECT_EQ(phase_mgr->getCurrentPhase(), 2ull); } }}} // end namespace vt::tests::unit diff --git a/tests/unit/termination/test_integral_set.cc b/tests/unit/termination/test_integral_set.cc index adc4b39cc1..b5df66fe5e 100644 --- a/tests/unit/termination/test_integral_set.cc +++ b/tests/unit/termination/test_integral_set.cc @@ -177,7 +177,7 @@ TEST_F(TestIntegralSet, test_interval_set_3) { i.insert(0); EXPECT_FALSE(i.empty()); - EXPECT_EQ(i.size(), 1); + EXPECT_EQ(i.size(), 1ull); } }}} // end namespace vt::tests::unit diff --git a/tests/unit/utils/test_histogram_approx.nompi.cc b/tests/unit/utils/test_histogram_approx.nompi.cc index ab21d3a8e9..f0379bc356 100644 --- a/tests/unit/utils/test_histogram_approx.nompi.cc +++ b/tests/unit/utils/test_histogram_approx.nompi.cc @@ -93,7 +93,7 @@ TEST_F(TestHistogramApprox, test_histogram_2) { EXPECT_EQ(h.getMin(), 1); EXPECT_EQ(h.getMax(), 92); EXPECT_EQ(h.getCount(), len); - EXPECT_EQ(h.getCentroids().size(), 4); + EXPECT_EQ(h.getCentroids().size(), 4u); } TEST_F(TestHistogramApprox, test_histogram_sum_3) { @@ -247,7 +247,7 @@ TEST_F(TestHistogramApprox, test_histogram_merge_7) { auto centroids = h1.getCentroids(); // Must be 8 centroids if merge/max was applied correctly - EXPECT_EQ(centroids.size(), 8); + EXPECT_EQ(centroids.size(), 8ull); // We should have all the original centroids, except the last one, which // should be a single combined centroids of the last three values if optimal