From 9318323b769200ee328456b0ef92ea19c1b96b6e Mon Sep 17 00:00:00 2001 From: Matthew Crymble Date: Thu, 25 Jun 2020 20:02:24 -0500 Subject: uhd: improved handling of empty serial number hints This allows device::find() calls to proceed even when encountering an empty/invalid serial number or serial number device argument hint. --- host/tests/serial_number_test.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'host/tests') diff --git a/host/tests/serial_number_test.cpp b/host/tests/serial_number_test.cpp index f2dc4bb42..e873bc538 100644 --- a/host/tests/serial_number_test.cpp +++ b/host/tests/serial_number_test.cpp @@ -19,4 +19,7 @@ BOOST_AUTO_TEST_CASE(test_serial_numbers_match) // Out of range BOOST_CHECK_EQUAL(false, uhd::utils::serial_numbers_match("aaaaaaaaaaaaaa", "abcd123")); + + // Invalid argument + BOOST_CHECK_EQUAL(false, uhd::utils::serial_numbers_match("", "abcd123")); } -- cgit v1.2.3