Add unit test for stack

- Also, fix bug where trees pushed onto the stack were not retained
This commit is contained in:
Max Brunsfeld 2014-06-03 13:19:49 -07:00
parent baec9f2c9a
commit 63cde3967c
7 changed files with 188 additions and 7 deletions

View file

@ -1,12 +1,5 @@
#include "runtime_spec_helper.h"
static ts_tree ** tree_array(vector<ts_tree *> trees) {
ts_tree ** result = (ts_tree **)calloc(trees.size(), sizeof(ts_tree *));
for (size_t i = 0; i < trees.size(); i++)
result[i] = trees[i];
return result;
}
START_TEST
enum {