Skip to content

Commit ddafab2

Browse files
committed
Test the reading of half-life error from NUBASE
Testing for #15
1 parent bc303cb commit ddafab2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/nuclide_test.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,20 @@ TEST_CASE("Read half-life unit", "[Nuclide]")
217217
}
218218

219219

220+
TEST_CASE("Read half-life error", "[Nuclide]")
221+
{
222+
const std::string nubase_gs03{
223+
"010 0030 10Li 33051 15 2.0 zs 0.5 (1-,2-) 99 94Yo01tj n=100"
224+
};
225+
Nuclide nubase_gs03_isotope(nubase_gs03);
226+
227+
nubase_gs03_isotope.setHalfLifeErrorValue();
228+
auto hl_error = Converter::seconds{ 0.5 };
229+
230+
REQUIRE(nubase_gs03_isotope.hl_error == hl_error);
231+
}
232+
233+
220234
TEST_CASE("Read and set half-life to double", "[Nuclide]")
221235
{
222236
const std::string nubase_gs03{

0 commit comments

Comments
 (0)