rotgen/test/unit/tests.hpp
Joel Falcou c400650f1a Implements rotgen::quaternion
Closes #19

Co-authored-by: Jules Pénuchot <jules@penuchot.com>
2025-11-09 19:07:20 +01:00

54 lines
1.4 KiB
C++

//==================================================================================================
/*
ROTGEN - Runtime Overlay for Eigen
Copyright : CODE RECKONS
SPDX-License-Identifier: BSL-1.0
*/
//==================================================================================================
#pragma once
#include <rotgen/concepts.hpp>
#include <rotgen/config.hpp>
#include <tts.hpp>
namespace rotgen::tests
{
template<auto N> struct constant
{
static constexpr auto value = N;
};
using scalar = tts::types<float, double>;
using order = tts::types<constant<ColMajor>, constant<RowMajor>>;
using types = tts::types<tts::types<float, constant<ColMajor>>,
tts::types<double, constant<ColMajor>>,
tts::types<float, constant<RowMajor>>,
tts::types<double, constant<RowMajor>>>;
}
#include <iostream>
template<typename T> constexpr bool verify_rotgen_reentrance(T const&)
{
if constexpr (rotgen::use_expression_templates) return true;
else return rotgen::concepts::entity<T>;
}
int main(int argc, char const** argv)
{
::tts::initialize(argc, argv);
#ifdef NDEBUG
constexpr auto assert_status = "Disabled";
#else
constexpr auto assert_status = "Enabled";
#endif
std::cout << "[ROTGEN] - Assertions: " << assert_status << std::endl;
rotgen::setup_summary(std::cout);
rotgen_main(argc, argv);
return tts::report(0, 0);
}