2 void test_dmd_comments() {
3 test_parser_verify_parse(
4 test_parser_sourcefile("dmd", " //comment"),
5 "dmd", "", "//comment", 0
9 void test_dmd_empty_comments() {
10 test_parser_verify_parse(
11 test_parser_sourcefile("dmd", " //\n"),
16 void test_dmd_strings() {
17 test_parser_verify_parse(
18 test_parser_sourcefile("dmd", "'/*' not a comment '*/'"),
19 "dmd", "'/*' not a comment '*/'", "", 0
23 void test_dmd_block_comment() {
24 test_parser_verify_parse(
25 test_parser_sourcefile("dmd", " /*d*/"),
28 test_parser_verify_parse(
29 test_parser_sourcefile("dmd", " /+d+/"),
34 void test_dmd_nested_block_comment() {
35 test_parser_verify_parse(
36 test_parser_sourcefile("dmd", "/+ /*d*/ not_code(); +/"),
37 "dmd", "", "/+ /*d*/ not_code(); +/", 0
41 void test_dmd_comment_entities() {
42 test_parser_verify_entity(
43 test_parser_sourcefile("dmd", " //comment"),
44 "comment", "//comment"
46 test_parser_verify_entity(
47 test_parser_sourcefile("dmd", " /*comment*/"),
48 "comment", "/*comment*/"
50 test_parser_verify_entity(
51 test_parser_sourcefile("dmd", " /+comment+/"),
52 "comment", "/+comment+/"
56 void all_dmd_tests() {
58 test_dmd_empty_comments();
60 test_dmd_block_comment();
61 test_dmd_nested_block_comment();
62 test_dmd_comment_entities();