8 #include "timed_automaton_runner.hh"
15 expected(std::move(expected)), hypothesis(std::move(hypothesis)) {
18 void run(std::string word, std::vector<double> durations,
int wrongLast = 0) {
21 for (std::size_t i = 0; i < word.size(); ++i) {
22 if (i + wrongLast <= word.size()) {
23 BOOST_CHECK_EQUAL(expected.
step(durations.at(i)), hypothesis.
step(durations.at(i)));
25 BOOST_CHECK_NE(expected.
step(durations.at(i)), hypothesis.
step(durations.at(i)));
27 if (i + wrongLast < word.size()) {
28 BOOST_CHECK_EQUAL(expected.
step(word.at(i)), hypothesis.
step(word.at(i)));
30 BOOST_CHECK_NE(expected.
step(word.at(i)), hypothesis.
step(word.at(i)));
33 if (durations.size() > word.size()) {
35 BOOST_CHECK_EQUAL(expected.
step(durations.back()), hypothesis.
step(durations.back()));
37 BOOST_CHECK_NE(expected.
step(durations.back()), hypothesis.
step(durations.back()));
Class to execute a timed automaton.
Definition: timed_automaton_runner.hh:22
bool step(char action) override
Feed a discrete action.
Definition: timed_automaton_runner.hh:80
void post() override
The function should be called after feeding each timed word.
Definition: timed_automaton_runner.hh:51
void pre() override
Reset the configuration.
Definition: timed_automaton_runner.hh:41
Definition: experiment_runner.hh:23
Definition: manual_eq_tester.hh:11