Commit cd00a1c5 authored by Peter Steinbach's avatar Peter Steinbach

releasing string requirements on device_name

parent e0a74d34
Pipeline #635 passed with stages
in 1 minute and 22 seconds
...@@ -38,12 +38,14 @@ TEST_CASE_METHOD( host_reference, "machine_specific" ){ ...@@ -38,12 +38,14 @@ TEST_CASE_METHOD( host_reference, "machine_specific" ){
SECTION( "device_name_right" ){ SECTION( "device_name_right" ){
auto value = compass::runtime::device_name(); auto value = compass::runtime::device_name();
auto brand = compass::runtime::brand();
if(expected_device_name.size()>0){ if(expected_device_name.size()>0){
REQUIRE(value.size() == expected_device_name.size()); REQUIRE(value.size() == expected_device_name.size());
REQUIRE_THAT(value, Catch::Matchers::Contains(expected_device_name) ); REQUIRE_THAT(value, Catch::Matchers::Contains(expected_device_name) );
} else { } else {
REQUIRE(value.size()>0); REQUIRE(value.size()>=0);
REQUIRE(value.size() <= brand.size());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment