12#include <catch2/catch_test_macros.hpp>
13#include <catch2/matchers/catch_matchers_string.hpp>
15#include "tests/utils/qvector.hpp"
16#include "tests/utils/qmatrix.hpp"
17#include "tests/utils/compare.hpp"
18#include "tests/utils/convert.hpp"
19#include "tests/utils/evolve.hpp"
20#include "tests/utils/linalg.hpp"
21#include "tests/utils/lists.hpp"
22#include "tests/utils/macros.hpp"
23#include "tests/utils/random.hpp"
25using Catch::Matchers::ContainsSubstring;
33#define TEST_CATEGORY \
34 LABEL_UNIT_TAG "[types]"
48 SECTION( LABEL_CORRECTNESS ) {
54 REQUIRE( std::real(comp) == re );
55 REQUIRE( std::imag(comp) == im );
58 SECTION( LABEL_VALIDATION ) {
66TEST_CASE(
"complex arithmetic", TEST_CATEGORY ) {
68 SECTION( LABEL_CORRECTNESS ) {
77 qcomp ref =
getQcomp(-1303/181., 1126/181.);
78 REQUIRE_AGREE( x, ref );
81 SECTION( LABEL_VALIDATION ) {
qreal getRandomReal(qreal min, qreal maxExcl)
void reportStr(const char *label)
static qcomp getQcomp(qreal re, qreal im)
void reportScalar(const char *label, qcomp num)
TEST_CASE("getQcomp", TEST_CATEGORY)