88 GIVEN(
"An empty activity registry and simple parameter set")
93 ps.
put(
"reportSettings",
true);
99 auto const fpcw_def =
getFPCW();
100 auto const fpcw_ref = fpcw_def;
101 auto const fpcw_ref_dp =
102 (fpcw_ref & ~fpControl_ALL_PREC) | fpControl_DOUBLE_PREC;
104 static auto verify_cleanup = [fpcw_def, &
reg](
auto& fpc) {
106 compare_fpcw(fpc, fpcw_def,
"Checking final FP state against default"s);
109 WHEN(
"We want the basic configuration")
112 THEN(
"The configuration is unchanged except for double precision math.")
114 compare_fpcw(fpc, fpcw_ref_dp);
115 verify_report(tstream);
120 WHEN(
"We want to suppress divide-by-zero exceptions")
122 ps.
put(
"enableDivByZeroEx",
true);
124 THEN(
"The configuration shows suppressed divide-by-zero exceptions")
126 compare_fpcw(fpc, fpcw_ref_dp & ~FE_DIVBYZERO);
127 verify_report(tstream, FE_DIVBYZERO);
132 WHEN(
"We want to suppress \"invalid\" exceptions")
134 ps.
put(
"enableInvalidEx",
true);
136 THEN(
"The configuration shows suppressed \"invalid\" exceptions")
138 compare_fpcw(fpc, fpcw_ref_dp & ~FE_INVALID);
139 verify_report(tstream, FE_INVALID);
144 WHEN(
"We want to suppress overflow exceptions")
146 ps.
put(
"enableOverFlowEx",
true);
148 THEN(
"The configuration shows suppressed overflow exceptions")
150 compare_fpcw(fpc, fpcw_ref_dp & ~FE_OVERFLOW);
151 verify_report(tstream, FE_OVERFLOW);
156 WHEN(
"We want to suppress underflow exceptions")
158 ps.
put(
"enableUnderFlowEx",
true);
160 THEN(
"The configuration shows suppressed underflow exceptions")
162 compare_fpcw(fpc, fpcw_ref_dp & ~FE_UNDERFLOW);
163 verify_report(tstream, FE_UNDERFLOW);
168 WHEN(
"We want default precision")
170 ps.
put(
"setPrecisionDouble",
false);
172 THEN(
"The configuration shows default precision")
174 compare_fpcw(fpc, fpcw_ref);
175 verify_report(tstream);
GlobalSignal< detail::SignalResponseType::LIFO, void()> sPostEndJob
std::ostringstream & getStringStream(std::string const &psetName)
static constexpr double ps
cet::registry_via_id< success_t, val > reg
void put(std::string const &key)