Codebase list ohcount / 420c4794-75b8-4551-a2c5-42f5fb1d3fbf/main test / unit / parsers / test_javascript.h
420c4794-75b8-4551-a2c5-42f5fb1d3fbf/main

Tree @420c4794-75b8-4551-a2c5-42f5fb1d3fbf/main (Download .tar.gz)

test_javascript.h @420c4794-75b8-4551-a2c5-42f5fb1d3fbf/mainraw · history · blame

void test_javascript_comments() {
  test_parser_verify_parse(
    test_parser_sourcefile("javascript", " //comment"),
    "javascript", "", "//comment", 0
  );
}

void test_javascript_comment_entities() {
  test_parser_verify_entity(
    test_parser_sourcefile("javascript", " //comment"),
    "comment", "//comment"
  );
  test_parser_verify_entity(
    test_parser_sourcefile("javascript", " /*comment*/"),
    "comment", "/*comment*/"
  );
}

void all_javascript_tests() {
  test_javascript_comments();
  test_javascript_comment_entities();
}