Skip to content

Commit 565d742

Browse files
author
Pablo David Aranda Rodriguez
committed
Fix tests
1 parent 4c1afee commit 565d742

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

tests/test_ur_driver.cpp

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,20 +359,29 @@ TEST(UrDriverInitTest, no_recipe_throws_error)
359359
EXPECT_THROW(UrDriver ur_driver(config), UrException);
360360
}
361361

362-
TEST(UrDriverInitTest, non_existing_recipe_file_throws_exception)
362+
TEST(UrDriverInitTest, non_existing_output_recipe_file_throws_exception)
363363
{
364364
UrDriverConfiguration config;
365365
config.socket_reconnect_attempts = 1;
366366
config.socket_reconnection_timeout = std::chrono::milliseconds(200);
367367
config.robot_ip = g_ROBOT_IP; // That IP address should not exist on the test network
368-
config.input_recipe_file = " ";
369-
config.output_recipe_file = OUTPUT_RECIPE;
368+
config.input_recipe_file = INPUT_RECIPE;
369+
config.output_recipe_file = " ";
370370
config.headless_mode = g_HEADLESS;
371371

372372
EXPECT_THROW(UrDriver ur_driver(config), UrException);
373+
}
373374

374-
config.input_recipe_file = INPUT_RECIPE;
375-
config.output_recipe_file = " ";
375+
TEST(UrDriverInitTest, non_existing_input_recipe_file_does_not_throw_exception)
376+
{
377+
UrDriverConfiguration config;
378+
config.socket_reconnect_attempts = 1;
379+
config.socket_reconnection_timeout = std::chrono::milliseconds(200);
380+
config.robot_ip = g_ROBOT_IP; // That IP address should not exist on the test network
381+
config.output_recipe_file = OUTPUT_RECIPE;
382+
config.headless_mode = g_HEADLESS;
383+
384+
EXPECT_NO_THROW(THROW(UrDriver ur_driver(config));
376385
}
377386

378387
TEST(UrDriverInitTest, both_recipe_file_and_vector_select_file)

0 commit comments

Comments
 (0)