Reading a line into the buffer was the only logic complex enough to be worth testing really, and exposing the necessary parts of it to test it effectively was a pain. Makes more sense to move read_line out and throw away most of the tests.
17 lines
235 B
C
17 lines
235 B
C
#ifndef REPL_H
|
|
#define REPL_H
|
|
|
|
#include "memory_pool.h"
|
|
|
|
#define REPL_BUFFER_SIZE 128
|
|
|
|
typedef struct {
|
|
memory_pool_t pool;
|
|
char buffer[REPL_BUFFER_SIZE];
|
|
} repl_t;
|
|
|
|
bool step_repl(repl_t *repl);
|
|
void run_repl(repl_t *repl);
|
|
|
|
#endif
|