Codebase list ohcount / c865d4db-f4b2-4b3e-8e76-e6475c6514d2/main test / unit / parsers / test_javascript.h
c865d4db-f4b2-4b3e-8e76-e6475c6514d2/main

Tree @c865d4db-f4b2-4b3e-8e76-e6475c6514d2/main (Download .tar.gz)

test_javascript.h @c865d4db-f4b2-4b3e-8e76-e6475c6514d2/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();
}