MCPcopy Create free account
hub / github.com/aff3ct/aff3ct / equivalent

Method equivalent

src/Module/Monitor/EXIT/Monitor_EXIT.cpp:64–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62
63template<typename B, typename R>
64bool
65Monitor_EXIT<B, R>::equivalent(const Monitor_EXIT<B, R>& m, bool do_throw) const
66{
67 if (get_N() != m.get_N())
68 {
69 if (!do_throw) return false;
70
71 std::stringstream message;
72 message << "'get_N()' is different than 'm.get_N()' ('get_N()' = " << get_N() << ", 'm.get_N()' = " << m.get_N()
73 << ").";
74 throw spu::tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());
75 }
76
77 if (get_max_n_trials() != m.get_max_n_trials())
78 {
79 if (!do_throw) return false;
80
81 std::stringstream message;
82 message << "'get_max_n_trials()' is different than 'm.get_max_n_trials()' ('get_max_n_trials()' = "
83 << get_max_n_trials() << ", 'm.get_max_n_trials()' = " << m.get_max_n_trials() << ").";
84 throw spu::tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());
85 }
86
87 return true;
88}
89
90template<typename B, typename R>
91void

Callers

nothing calls this directly

Calls 2

get_NMethod · 0.45
get_max_n_trialsMethod · 0.45

Tested by

no test coverage detected