OpenKalman
OpenKalman
basics
tests
tests.hpp
Go to the documentation of this file.
1
/* This file is part of OpenKalman, a header-only C++ library for
2
* Kalman filters and other recursive filters.
3
*
4
* Copyright (c) 2017-2025 Christopher Lee Ogden <ogden@gatech.edu>
5
*
6
* This Source Code Form is subject to the terms of the Mozilla Public
7
* License, v. 2.0. If a copy of the MPL was not distributed with this
8
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
9
*/
10
17
#ifndef OPENKALMAN_TESTS_HPP
18
#define OPENKALMAN_TESTS_HPP
19
20
#include <type_traits>
21
#include <tuple>
22
#include <string>
23
#include <gtest/gtest.h>
24
#include "
collections/concepts/tuple_like.hpp
"
25
26
27
namespace
OpenKalman::test
28
{
36
#ifdef __cpp_concepts
37
template
<
typename
Arg1,
typename
Arg2,
typename
Err>
38
#else
39
template
<
typename
Arg1,
typename
Arg2,
typename
Err,
typename
=
void
>
40
#endif
41
struct
TestComparison
;
42
43
48
template
<
typename
Arg1,
typename
Arg2,
typename
Err>
49
TestComparison
(
const
Arg1&,
const
Arg2&,
const
Err&) ->
TestComparison<Arg1, Arg2, Err>
;
50
51
59
template
<
typename
Arg1,
typename
Arg2,
typename
Err =
double
>
60
inline ::testing::AssertionResult
is_near
(
const
Arg1& arg1,
const
Arg2& arg2,
const
Err& err = 1e-6)
61
{
62
return
TestComparison
{arg1, arg2, err};
63
}
64
65
}
// namespace OpenKalman::test
66
67
68
#endif //OPENKALMAN_TESTS_HPP
tuple_like.hpp
Definition for collections::tuple_like.
OpenKalman::test::TestComparison
Definition:
tests.hpp:41
OpenKalman::test
Definition:
tests.hpp:27
OpenKalman::test::is_near
inline ::testing::AssertionResult is_near(const Arg1 &arg1, const Arg2 &arg2, const Err &err=1e-6)
Determine if two objects are "near" each other, within a margin of error.
Definition:
tests.hpp:60
Generated by
1.8.13