Commit b5db02e63ba2a33188fbeb15b017a9659d7fcd3d
1 parent
c2ae842d
Add more tests for GRmf class.
Showing
1 changed file
with
14 additions
and
0 deletions
test/test_GXspec.cpp
| ... | ... | @@ -32,6 +32,10 @@ |
| 32 | 32 | #include "GTools.hpp" |
| 33 | 33 | |
| 34 | 34 | |
| 35 | +/* __ Constants __________________________________________________________ */ | |
| 36 | +const std::string rmfname = PACKAGE_SOURCE"/test/data/rmf.fits"; | |
| 37 | + | |
| 38 | + | |
| 35 | 39 | /***********************************************************************//** |
| 36 | 40 | * @brief Set parameters and tests |
| 37 | 41 | **************************************************************************/ |
| ... | ... | @@ -259,6 +263,16 @@ void TestGXspec::test_GRmf(void) |
| 259 | 263 | test_try_failure(e); |
| 260 | 264 | } |
| 261 | 265 | |
| 266 | + // Test filename constructor | |
| 267 | + test_try("GRmf filename constructor"); | |
| 268 | + try { | |
| 269 | + GRmf rmf(rmfname); | |
| 270 | + test_try_success(); | |
| 271 | + } | |
| 272 | + catch (std::exception &e) { | |
| 273 | + test_try_failure(e); | |
| 274 | + } | |
| 275 | + | |
| 262 | 276 | // Test energy boundary constructor |
| 263 | 277 | test_try("GRmf energy boundary constructor"); |
| 264 | 278 | try { | ... | ... |