Fixes recursion bug in disambiguate_in().
[ohcount] / test / unit / parsers / test_matlab.h
1
2 void test_matlab_line_comment_1() {
3   test_parser_verify_parse(
4     test_parser_sourcefile("matlab", " %comment"),
5     "matlab", "", "%comment", 0
6   );
7 }
8
9 void test_matlab_ancient_syntax_comment() {
10   test_parser_verify_parse(
11     test_parser_sourcefile("matlab", " ... comment"),
12     "matlab", "", "... comment", 0
13   );
14 }
15
16 void test_matlab_false_line_comment() {
17   test_parser_verify_parse(
18     test_parser_sourcefile("matlab", " %{block%} code"),
19     "matlab", "%{block%} code", "", 0
20   );
21 }
22
23 void test_matlab_comment_entities() {
24   test_parser_verify_entity(
25     test_parser_sourcefile("matlab", " %comment"),
26     "comment", "%comment"
27   );
28   test_parser_verify_entity(
29     test_parser_sourcefile("matlab", " ... comment"),
30     "comment", "... comment"
31   );
32   test_parser_verify_entity(
33     test_parser_sourcefile("matlab", " %{comment%}"),
34     "comment", "%{comment%}"
35   );
36 }
37
38 void all_matlab_tests() {
39   test_matlab_line_comment_1();
40   test_matlab_ancient_syntax_comment();
41   test_matlab_false_line_comment();
42   test_matlab_comment_entities();
43 }