Working on benchmarking test. A lot of things needed to be const and weren't.
This commit is contained in:
parent
d0d9a94fd0
commit
21ec962d76
7 changed files with 17 additions and 11 deletions
|
|
@ -2,11 +2,14 @@
|
|||
#include "hammer.h"
|
||||
|
||||
HParserTestcase testcases[] = {
|
||||
{NULL, 0, NULL}
|
||||
{(unsigned char*)"1,2,3", 5, "(u0x31 u0x32 u0x33)"},
|
||||
{(unsigned char*)"1,3,2", 5, "(u0x31 u0x33 u0x32)"},
|
||||
{(unsigned char*)"1,3", 3, "(u0x31 u0x33)"},
|
||||
{(unsigned char*)"3", 1, "(u0x33)"}
|
||||
};
|
||||
|
||||
void test_benchmark_1() {
|
||||
HParser *parser = NULL; // TODO: fill this in.
|
||||
const HParser *parser = h_sepBy1(h_choice(h_ch('1'), h_ch('2'), h_ch('3'), NULL), h_ch(','));
|
||||
|
||||
HBenchmarkResults *res = h_benchmark(parser, testcases);
|
||||
h_benchmark_report(stderr, res);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue