mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 10:30:41 +02:00
Merge branch 'developer' into dev/detname
This commit is contained in:
commit
1128eb037d
@ -14,4 +14,4 @@ slsDetectorPackage/8.0.2_rh8 stable cmake/3.15.5 Qt/5.12.10
|
|||||||
slsDetectorPackage/9.0.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
slsDetectorPackage/9.0.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||||
slsDetectorPackage/9.1.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
slsDetectorPackage/9.1.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||||
slsDetectorPackage/9.1.1_rh8 stable cmake/3.15.5 Qt/5.12.10
|
slsDetectorPackage/9.1.1_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||||
|
slsDetectorPackage/9.2.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||||
|
@ -100,7 +100,6 @@ if(SLS_USE_TEXTCLIENT)
|
|||||||
target_link_libraries(${val1}
|
target_link_libraries(${val1}
|
||||||
slsDetectorStatic
|
slsDetectorStatic
|
||||||
pthread
|
pthread
|
||||||
rt
|
|
||||||
)
|
)
|
||||||
SET_SOURCE_FILES_PROPERTIES( src/Caller.cpp PROPERTIES COMPILE_FLAGS "-Wno-unused-variable -Wno-unused-but-set-variable")
|
SET_SOURCE_FILES_PROPERTIES( src/Caller.cpp PROPERTIES COMPILE_FLAGS "-Wno-unused-variable -Wno-unused-but-set-variable")
|
||||||
|
|
||||||
|
@ -47,6 +47,8 @@ std::string ToString(const defs::polarity s);
|
|||||||
std::string ToString(const defs::timingInfoDecoder s);
|
std::string ToString(const defs::timingInfoDecoder s);
|
||||||
std::string ToString(const defs::collectionMode s);
|
std::string ToString(const defs::collectionMode s);
|
||||||
|
|
||||||
|
std::string ToString(bool value);
|
||||||
|
|
||||||
std::string ToString(const slsDetectorDefs::xy &coord);
|
std::string ToString(const slsDetectorDefs::xy &coord);
|
||||||
std::ostream &operator<<(std::ostream &os, const slsDetectorDefs::xy &coord);
|
std::ostream &operator<<(std::ostream &os, const slsDetectorDefs::xy &coord);
|
||||||
std::string ToString(const slsDetectorDefs::ROI &roi);
|
std::string ToString(const slsDetectorDefs::ROI &roi);
|
||||||
|
@ -5,6 +5,13 @@
|
|||||||
|
|
||||||
namespace sls {
|
namespace sls {
|
||||||
|
|
||||||
|
|
||||||
|
std::string ToString(bool value) {
|
||||||
|
return value ? "1" : "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
std::string ToString(const slsDetectorDefs::xy &coord) {
|
std::string ToString(const slsDetectorDefs::xy &coord) {
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << '[' << coord.x << ", " << coord.y << ']';
|
oss << '[' << coord.x << ", " << coord.y << ']';
|
||||||
|
@ -16,6 +16,17 @@ namespace sls {
|
|||||||
|
|
||||||
using namespace sls::time;
|
using namespace sls::time;
|
||||||
|
|
||||||
|
TEST_CASE("Convert bool to string", "[support]") {
|
||||||
|
REQUIRE(ToString(true) == "1");
|
||||||
|
REQUIRE(ToString(false) == "0");
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_CASE("Convert string to bool", "[support]") {
|
||||||
|
REQUIRE(StringTo<bool>("1") == true);
|
||||||
|
REQUIRE(StringTo<bool>("0") == false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("Integer conversions", "[support]") {
|
TEST_CASE("Integer conversions", "[support]") {
|
||||||
REQUIRE(ToString(0) == "0");
|
REQUIRE(ToString(0) == "0");
|
||||||
REQUIRE(ToString(1) == "1");
|
REQUIRE(ToString(1) == "1");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user