MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / ChunkGenerator

Method ChunkGenerator

test/expected/catch.hpp:4249–4262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4247 bool m_used_up = false;
4248 public:
4249 ChunkGenerator(size_t size, GeneratorWrapper<T> generator) :
4250 m_chunk_size(size), m_generator(std::move(generator))
4251 {
4252 m_chunk.reserve(m_chunk_size);
4253 if (m_chunk_size != 0) {
4254 m_chunk.push_back(m_generator.get());
4255 for (size_t i = 1; i < m_chunk_size; ++i) {
4256 if (!m_generator.next()) {
4257 Catch::throw_exception(GeneratorException("Not enough values to initialize the first chunk"));
4258 }
4259 m_chunk.push_back(m_generator.get());
4260 }
4261 }
4262 }
4263 std::vector<T> const& get() const override {
4264 return m_chunk;
4265 }

Callers

nothing calls this directly

Calls 4

throw_exceptionFunction · 0.85
GeneratorExceptionClass · 0.85
getMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected