Codebase list ohcount / 6c6b3496-5c95-4881-94ad-331592f9fd83/main test / unit / parsers / test_stratego.h
6c6b3496-5c95-4881-94ad-331592f9fd83/main

Tree @6c6b3496-5c95-4881-94ad-331592f9fd83/main (Download .tar.gz)

test_stratego.h @6c6b3496-5c95-4881-94ad-331592f9fd83/mainraw · history · blame

void test_stratego_comments() {
  test_parser_verify_parse(
    test_parser_sourcefile("stratego", " // comment"),
    "stratego", "", "// comment", 0
  );
}

void test_stratego_char_string_entities() {
  test_parser_verify_entity(
    test_parser_sourcefile("stratego", " 'c'"),
    "string", "'c'"
  );
  // single quote can be used in identifiers
  // weak case
  test_parser_verify_entity(
    test_parser_sourcefile("stratego", " c'"),
    "string", ""
  );
  // strong case
  test_parser_verify_entity(
    test_parser_sourcefile("stratego", " c' = e'"),
    "string", ""
  );
}

void all_stratego_tests() {
  test_stratego_comments();
  test_stratego_char_string_entities();
}