mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-01 15:04:56 +01:00
strcpy and cleanup of configuremac
This commit is contained in:
@@ -93,4 +93,22 @@ TEST_CASE("Convert ip address"){
|
||||
std::string address = "101.255.103.1";
|
||||
REQUIRE(sls::stringIpToHex(address) == "65ff6701");
|
||||
|
||||
}
|
||||
|
||||
TEST_CASE("Remove char from string"){
|
||||
char str[] = "sometest";
|
||||
sls::removeChar(str, 'e');
|
||||
REQUIRE(std::string(str) == "somtst");
|
||||
}
|
||||
|
||||
TEST_CASE("Remove char from empty string"){
|
||||
char str[50] = {};
|
||||
sls::removeChar(str, 'e');
|
||||
REQUIRE(std::string(str) == "");
|
||||
}
|
||||
|
||||
TEST_CASE("Many characters in a row"){
|
||||
char str[] = "someeequitellll::ongstring";
|
||||
sls::removeChar(str, 'l');
|
||||
REQUIRE(std::string(str) == "someeequite::ongstring");
|
||||
}
|
||||
Reference in New Issue
Block a user