mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
moffat_test.cpp
Go to the documentation of this file.
1 /** \file moffat_test.cpp
2  */
3 #include "../../../catch2/catch.hpp"
4 
5 #include <Eigen/Dense>
6 
7 #define MX_NO_ERROR_REPORTS
8 
9 #include "../../../../include/math/func/moffat.hpp"
10 
11 /** Scenario: compiling 1D Moffat function.
12  *
13  *
14  * \anchor tests_math_func_moffat1D
15  */
16 SCENARIO( "compiling 1D Moffat function", "[math::func::moffat]" )
17 {
18  GIVEN("the 1D Moffat function")
19  {
20  WHEN("compiling")
21  {
22  double mv = mx::math::func::moffat<double>(0., 0., 1., 0., 1., 1.);
23  REQUIRE(mv == 1.0);
24  }
25  }
26 }
27 
28 /** Scenario: compiling 2D Moffat function.
29  *
30  *
31  * \anchor tests_math_func_moffat2D
32  */
33 SCENARIO( "compiling 2D Moffat function", "[math::func::moffat]" )
34 {
35  GIVEN("the 2D Moffat function")
36  {
37  WHEN("compiling")
38  {
39  double mv = mx::math::func::moffat2D<double>(0., 0., 0., 1., 0., 0., 1., 1.);
40  REQUIRE(mv == 1.0);
41  }
42  }
43 }
44 
45 /** Scenario: compiling Moffat FWHM
46  *
47  *
48  * \anchor tests_math_func_moffatFWHM
49  */
50 SCENARIO( "compiling Moffat FWHM", "[math::func::moffat]" )
51 {
52  GIVEN("the Moffat FWHM")
53  {
54  WHEN("compiling")
55  {
56  double mv = mx::math::func::moffatFWHM<double>(1.,1.);
57  REQUIRE(mv == 2.0);
58  }
59  }
60 }
SCENARIO("compiling 1D Moffat function", "[math::func::moffat]")
Definition: moffat_test.cpp:16