mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 00:07:13 +02:00
formatting
This commit is contained in:
@ -113,10 +113,12 @@ template <typename T, size_t Capacity> class StaticVector {
|
|||||||
// auto begin() noexcept -> decltype(data_.begin()) { return data_.begin();
|
// auto begin() noexcept -> decltype(data_.begin()) { return data_.begin();
|
||||||
// }
|
// }
|
||||||
const_iterator begin() const noexcept { return data_.begin(); }
|
const_iterator begin() const noexcept { return data_.begin(); }
|
||||||
iterator end() noexcept { return data_.begin()+current_size; }
|
iterator end() noexcept { return data_.begin() + current_size; }
|
||||||
const_iterator end() const noexcept { return data_.begin()+current_size; }
|
const_iterator end() const noexcept { return data_.begin() + current_size; }
|
||||||
const_iterator cbegin() const noexcept { return data_.cbegin(); }
|
const_iterator cbegin() const noexcept { return data_.cbegin(); }
|
||||||
const_iterator cend() const noexcept { return data_.cbegin()+current_size; }
|
const_iterator cend() const noexcept {
|
||||||
|
return data_.cbegin() + current_size;
|
||||||
|
}
|
||||||
|
|
||||||
void size_check(size_type s) const {
|
void size_check(size_type s) const {
|
||||||
if (s > Capacity) {
|
if (s > Capacity) {
|
||||||
|
@ -10,4 +10,3 @@
|
|||||||
#define APIXILINXCTB "0.0.0 0x250523"
|
#define APIXILINXCTB "0.0.0 0x250523"
|
||||||
#define APIJUNGFRAU "0.0.0 0x250523"
|
#define APIJUNGFRAU "0.0.0 0x250523"
|
||||||
#define APIMYTHEN3 "0.0.0 0x250523"
|
#define APIMYTHEN3 "0.0.0 0x250523"
|
||||||
|
|
||||||
|
@ -5,12 +5,7 @@
|
|||||||
|
|
||||||
namespace sls {
|
namespace sls {
|
||||||
|
|
||||||
|
std::string ToString(bool value) { return value ? "1" : "0"; }
|
||||||
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;
|
||||||
|
@ -8,15 +8,12 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
using sls::StaticVector;
|
using sls::StaticVector;
|
||||||
|
|
||||||
TEST_CASE("StaticVector is a container") {
|
TEST_CASE("StaticVector is a container") {
|
||||||
REQUIRE(sls::is_container<StaticVector<int, 7>>::value == true);
|
REQUIRE(sls::is_container<StaticVector<int, 7>>::value == true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("Comparing StaticVector containers") {
|
TEST_CASE("Comparing StaticVector containers") {
|
||||||
StaticVector<int, 5> a{0, 1, 2};
|
StaticVector<int, 5> a{0, 1, 2};
|
||||||
StaticVector<int, 5> b{0, 1, 2};
|
StaticVector<int, 5> b{0, 1, 2};
|
||||||
@ -344,4 +341,3 @@ TEST_CASE("StaticVector stream") {
|
|||||||
oss << vec;
|
oss << vec;
|
||||||
REQUIRE(oss.str() == "[33, 85667, 2]");
|
REQUIRE(oss.str() == "[33, 85667, 2]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ TEST_CASE("Convert string to bool", "[support]") {
|
|||||||
REQUIRE(StringTo<bool>("0") == false);
|
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");
|
||||||
|
Reference in New Issue
Block a user