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

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

test_livecode.h @c941801a-846c-49c1-93c4-07f1094d7537/mainraw · history · blame

void test_livecode_comments() {
  test_parser_verify_parse(
    test_parser_sourcefile("livecode", " --comment"),
    "livecode", "", "--comment", 0
  );
}

void test_livecode_empty_comments() {
  test_parser_verify_parse(
    test_parser_sourcefile("livecode", " --\n"),
    "livecode", "", "--\n", 0
  );
}

void test_livecode_block_comment() {
  test_parser_verify_parse(
    test_parser_sourcefile("livecode", " /*livecode*/"),
    "livecode", "", "/*livecode*/", 0
  );
}

void test_livecode_comment_entities() {
  test_parser_verify_entity(
    test_parser_sourcefile("livecode", " --comment"),
    "comment", "--comment"
  );
  test_parser_verify_entity(
    test_parser_sourcefile("livecode", " #comment"),
    "comment", "#comment"
  );
  test_parser_verify_entity(
    test_parser_sourcefile("livecode", " //comment"),
    "comment", "//comment"
  );
  test_parser_verify_entity(
    test_parser_sourcefile("livecode", " /*comment*/"),
    "comment", "/*comment*/"
  );
}

void all_livecode_tests() {
  test_livecode_comments();
  test_livecode_empty_comments();
  test_livecode_block_comment();
  test_livecode_comment_entities();
}