Skip to content

Commit

Permalink
Fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-siffert-ocado committed Nov 18, 2024
1 parent ed9c129 commit 7d36c20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions tests/test_rtde_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@ TEST_F(RTDEClientTest, empty_recipe_file)
TEST_F(RTDEClientTest, invalid_target_frequency)
{
// Setting target frequency below 0 or above 500, should throw an exception
client_.reset(new rtde_interface::RTDEClient(ROBOT_IP, notifier_, output_recipe_file_, input_recipe_file_, -1.0));
client_.reset(
new rtde_interface::RTDEClient(ROBOT_IP, notifier_, output_recipe_file_, input_recipe_file_, false, -1.0));

EXPECT_THROW(client_->init(), UrException);

client_.reset(new rtde_interface::RTDEClient(ROBOT_IP, notifier_, output_recipe_file_, input_recipe_file_, 1000));
client_.reset(
new rtde_interface::RTDEClient(ROBOT_IP, notifier_, output_recipe_file_, input_recipe_file_, false, 1000));

EXPECT_THROW(client_->init(), UrException);
}
Expand All @@ -165,7 +167,7 @@ TEST_F(RTDEClientTest, unconfigured_target_frequency)

TEST_F(RTDEClientTest, set_target_frequency)
{
client_.reset(new rtde_interface::RTDEClient(ROBOT_IP, notifier_, output_recipe_file_, input_recipe_file_, 1));
client_.reset(new rtde_interface::RTDEClient(ROBOT_IP, notifier_, output_recipe_file_, input_recipe_file_, false, 1));
client_->init();

// Maximum frequency should still be equal to the robot's maximum frequency
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ur_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ TEST_F(UrDriverTest, send_robot_program_retry_on_failure)
TEST_F(UrDriverTest, reset_rtde_client)
{
double target_frequency = 50;
g_ur_driver_->resetRTDEClient(OUTPUT_RECIPE, INPUT_RECIPE, target_frequency);
g_ur_driver_->resetRTDEClient(OUTPUT_RECIPE, INPUT_RECIPE, false, target_frequency);
ASSERT_EQ(g_ur_driver_->getControlFrequency(), target_frequency);
}

Expand Down

0 comments on commit 7d36c20

Please sign in to comment.