Merge pull request #41 from blackducksw/ubuntu_14
[ohcount] / test / unit / parsers / test_boo.h
1
2 void test_boo_comment() {
3   test_parser_verify_parse(
4     test_parser_sourcefile("boo", " #comment"),
5     "boo", "", "#comment", 0
6   );
7 }
8
9 void test_boo_block_comment() {
10   test_parser_verify_parse(
11     test_parser_sourcefile("boo", " /*comment*/"),
12     "boo", "", "/*comment*/", 0
13   );
14 }
15
16 void test_boo_nested_block_comment() {
17   test_parser_verify_parse(
18     test_parser_sourcefile("boo", " /* comment\n /* nested */\nstill a comment */"),
19     "boo", "", "/* comment\n/* nested */\nstill a comment */", 0
20   );
21 }
22
23 void test_boo_doc_comments() {
24   test_parser_verify_parse(
25     test_parser_sourcefile("boo", "\"\"\"\\ndoc comment\n\"\"\""),
26     "boo", "", "\"\"\"\\ndoc comment\n\"\"\"", 0
27   );
28 }
29
30 void test_boo_strings() {
31   test_parser_verify_parse(
32     test_parser_sourcefile("boo", "\"abc#not a 'comment\""),
33     "boo", "\"abc#not a 'comment\"", "", 0
34   );
35 }
36
37 void test_boo_comment_entities() {
38   test_parser_verify_entity(
39     test_parser_sourcefile("boo", " #comment"),
40     "comment", "#comment"
41   );
42   test_parser_verify_entity(
43     test_parser_sourcefile("boo", " //comment"),
44     "comment", "//comment"
45   );
46 }
47
48 void all_boo_tests() {
49   test_boo_comment();
50   test_boo_block_comment();
51   test_boo_nested_block_comment();
52   test_boo_doc_comments();
53   test_boo_strings();
54   test_boo_comment_entities();
55 }