IRSOL
C++ code implementing socket server for interacting with Baumer camera.
test_utils.cpp File Reference
#include "irsol/utils.hpp"
#include <catch2/catch_all.hpp>
#include <set>

Go to the source code of this file.

Functions

 CHECK (irsol::utils::toInt(protocolValue)==rawValue)
 
 CHECK (irsol::utils::toDouble(protocolValue)==Catch::Approx(rawValue))
 
 CHECK (irsol::utils::toString(protocolValue)==rawValue)
 
 for (size_t i=0;i< 10000;++i)
 
 CHECK (result==expected)
 

Variables

auto protocolValue = irsol::types::protocol_value_t{rawValue}
 
auto result = irsol::utils::split(inString, delimiter)
 
std::vector< std::string > expected {"Hello", "world"}
 

Function Documentation

◆ CHECK() [1/4]

CHECK ( irsol::utils::toDouble(protocolValue = =Catch::Approx(rawValue))

◆ CHECK() [2/4]

CHECK ( irsol::utils::toInt(protocolValue = =rawValue)

◆ CHECK() [3/4]

CHECK ( irsol::utils::toString(protocolValue = =rawValue)

◆ CHECK() [4/4]

CHECK ( result  = =expected)

◆ for()

for ( )

Definition at line 30 of file test_utils.cpp.

30 {
31 auto uuid = irsol::utils::uuid();
32 CHECK(results.find(uuid) == results.end());
33 results.insert(uuid);
34 }
std::string uuid()
Generates a new UUID string.
Definition utils.cpp:16
CHECK(irsol::utils::toInt(protocolValue)==rawValue)

Variable Documentation

◆ expected

std::vector< std::string > expected {"Hello", "world"}

Definition at line 44 of file test_utils.cpp.

44{"Hello", "world"};

◆ protocolValue

auto protocolValue = irsol::types::protocol_value_t{rawValue}

Definition at line 9 of file test_utils.cpp.

9{rawValue};

◆ result

auto result = irsol::utils::split(inString, delimiter)

Definition at line 43 of file test_utils.cpp.