Exemplo n.º 1
0
Suite *test_suite(void)
{
    Suite *s = suite_create("Gear");

    suite_add_tcase(s, lexer_general_tests());
    suite_add_tcase(s, lexer_comment_tests());
    suite_add_tcase(s, lexer_operator_tests());
    suite_add_tcase(s, lexer_location_tests());
    suite_add_tcase(s, lexer_token_tests());
    suite_add_tcase(s, lexer_error_tests());

    suite_add_tcase(s, parser_general_tests());
    suite_add_tcase(s, parser_literals_tests());
    suite_add_tcase(s, parser_control_flow_tests());
    suite_add_tcase(s, parser_binary_operators_tests());
    suite_add_tcase(s, parser_unary_operators_tests());
    suite_add_tcase(s, parser_store_tests());
    suite_add_tcase(s, parser_load_tests());
    suite_add_tcase(s, parser_error_tests());
    
    suite_add_tcase(s, hash_table_tests());
    suite_add_tcase(s, string_storage_tests());
    suite_add_tcase(s, codegen_general_tests());
    suite_add_tcase(s, optimizer_constant_folding_tests());
    suite_add_tcase(s, c_api_compiler_tests());
    suite_add_tcase(s, diangostics_tests());

    return s;
}
Exemplo n.º 2
0
int main(int argc, char **argv) {
  int failure_count = 0;
  failure_count += counter_variable_tests();
  failure_count += sample_variable_tests();
  failure_count += hash_table_tests();
  failure_count += json_helpers_tests();
  failure_count += input_parser_tests();
  failure_count += executor_tests();
  return failure_count;
}