2021-10-10 20:26:30 +00:00
|
|
|
#include "stdafx.h"
|
|
|
|
#include "opcode_test_suite_t.h"
|
|
|
|
|
2021-10-24 12:39:08 +00:00
|
|
|
opcode_test_suite_t::opcode_test_suite_t(const std::string path) noexcept
|
|
|
|
: parser_t(path) {}
|
2021-10-27 08:53:58 +00:00
|
|
|
|
2022-01-03 00:50:41 +00:00
|
|
|
#ifdef USE_COROUTINES
|
2022-01-01 13:20:34 +00:00
|
|
|
#if __cplusplus >= 202002L
|
2021-12-17 09:19:16 +00:00
|
|
|
EightBit::co_generator_t<test_t> opcode_test_suite_t::generator() {
|
2021-10-27 08:53:58 +00:00
|
|
|
for (const auto element : *this)
|
|
|
|
co_yield test_t(element);
|
|
|
|
}
|
2022-01-01 13:20:34 +00:00
|
|
|
#else
|
|
|
|
void opcode_test_suite_t::generator(boost::coroutines2::coroutine<test_t>::push_type& sink) {
|
|
|
|
for (const auto element : *this)
|
|
|
|
sink(test_t(element));
|
|
|
|
}
|
2022-01-03 00:50:41 +00:00
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
std::vector<test_t> opcode_test_suite_t::generate() {
|
|
|
|
std::vector<test_t> returned;
|
|
|
|
for (const auto element : *this)
|
|
|
|
returned.push_back(test_t(element));
|
|
|
|
return returned;
|
|
|
|
}
|
2022-01-01 13:20:34 +00:00
|
|
|
#endif
|