Skip to content
Snippets Groups Projects
Commit 7aac6b39 authored by Meredith L. Patterson's avatar Meredith L. Patterson
Browse files

Merge branch '87-transition-conflict' into 'master'

add regression test for issue 87 - same as issue 91

Closes #87

See merge request hammer/hammer!37
parents 14176a1c 7cf23b76
No related branches found
No related tags found
No related merge requests found
...@@ -384,6 +384,16 @@ static void test_issue91() { ...@@ -384,6 +384,16 @@ static void test_issue91() {
g_check_cmp_int(r, ==, -2); g_check_cmp_int(r, ==, -2);
} }
// a different instance of issue 91
static void test_issue87() {
HParser *a = h_ch('a');
HParser *a2 = h_ch_range('a', 'a');
HParser *p = h_many(h_many(h_choice(a, a2, NULL)));
int r = h_compile(p, PB_LALR, NULL);
g_check_cmp_int(r, ==, -2);
}
static void test_issue92() { static void test_issue92() {
HParser *a = h_ch('a'); HParser *a = h_ch('a');
HParser *b = h_ch('b'); HParser *b = h_ch('b');
...@@ -475,6 +485,7 @@ void register_regression_tests(void) { ...@@ -475,6 +485,7 @@ void register_regression_tests(void) {
g_test_add_func("/core/regression/flatten_null", test_flatten_null); g_test_add_func("/core/regression/flatten_null", test_flatten_null);
//XXX g_test_add_func("/core/regression/ast_length_index", test_ast_length_index); //XXX g_test_add_func("/core/regression/ast_length_index", test_ast_length_index);
g_test_add_func("/core/regression/issue91", test_issue91); g_test_add_func("/core/regression/issue91", test_issue91);
g_test_add_func("/core/regression/issue87", test_issue87);
g_test_add_func("/core/regression/issue92", test_issue92); g_test_add_func("/core/regression/issue92", test_issue92);
g_test_add_func("/core/regression/issue83", test_issue83); g_test_add_func("/core/regression/issue83", test_issue83);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment