Codebase list ohcount / c941801a-846c-49c1-93c4-07f1094d7537/main test / unit / parsers / test_javascript.h
c941801a-846c-49c1-93c4-07f1094d7537/main

Tree @c941801a-846c-49c1-93c4-07f1094d7537/main (Download .tar.gz)

test_javascript.h @c941801a-846c-49c1-93c4-07f1094d7537/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();
}