Codebase list ohcount / 81a9b407-9b9f-4b49-8972-ed3f6d30059f/main test / unit / parsers / test_matlab.h
81a9b407-9b9f-4b49-8972-ed3f6d30059f/main

Tree @81a9b407-9b9f-4b49-8972-ed3f6d30059f/main (Download .tar.gz)

test_matlab.h @81a9b407-9b9f-4b49-8972-ed3f6d30059f/mainraw · history · blame

void test_matlab_line_comment_1() {
  test_parser_verify_parse(
    test_parser_sourcefile("matlab", " %comment"),
    "matlab", "", "%comment", 0
  );
}

void test_matlab_ancient_syntax_comment() {
  test_parser_verify_parse(
    test_parser_sourcefile("matlab", " ... comment"),
    "matlab", "", "... comment", 0
  );
}

void test_matlab_false_line_comment() {
  test_parser_verify_parse(
    test_parser_sourcefile("matlab", " %{block%} code"),
    "matlab", "%{block%} code", "", 0
  );
}

void test_matlab_comment_entities() {
  test_parser_verify_entity(
    test_parser_sourcefile("matlab", " %comment"),
    "comment", "%comment"
  );
  test_parser_verify_entity(
    test_parser_sourcefile("matlab", " ... comment"),
    "comment", "... comment"
  );
  test_parser_verify_entity(
    test_parser_sourcefile("matlab", " %{comment%}"),
    "comment", "%{comment%}"
  );
}

void all_matlab_tests() {
  test_matlab_line_comment_1();
  test_matlab_ancient_syntax_comment();
  test_matlab_false_line_comment();
  test_matlab_comment_entities();
}