mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00

* separating pattern levels from command name: command line done * separated patten level from command in examples and default pattern files in servers * command line and server works * python: patnloop not verified, wip * works except for patloop (set, and get does not list properly) * minor * fixed tests * added 3 more levels for ctb and moench * wip * minor err msg * minor * binaries in * separating pattern levels from command name: command line done * separated patten level from command in examples and default pattern files in servers * command line and server works * python: patnloop not verified, wip * works except for patloop (set, and get does not list properly) * minor * fixed tests * added 3 more levels for ctb and moench * wip * minor err msg * minor * binaries in * python working * import fix * changed fw version for ctb and moench. binaries in Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
32 lines
704 B
C++
32 lines
704 B
C++
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
#include "catch.hpp"
|
|
#include "sls/Pattern.h"
|
|
|
|
namespace sls {
|
|
|
|
TEST_CASE("Pattern is default constructable and has zeroed fields") {
|
|
Pattern p;
|
|
for (int i = 0; i != MAX_PATTERN_LENGTH; ++i)
|
|
REQUIRE(p.data()->word[i] == 0);
|
|
REQUIRE(p.data()->ioctrl == 0);
|
|
}
|
|
|
|
TEST_CASE("Copy construct pattern") {
|
|
Pattern p;
|
|
p.data()->startloop[0] = 7;
|
|
Pattern p1(p);
|
|
REQUIRE(p1.data()->startloop[0] == 7);
|
|
}
|
|
|
|
TEST_CASE("Compare patterns") {
|
|
Pattern p;
|
|
Pattern p1;
|
|
REQUIRE(p == p1);
|
|
|
|
p1.data()->word[500] = 1;
|
|
REQUIRE_FALSE(p == p1);
|
|
}
|
|
|
|
} // namespace sls
|