/** *The entry point of the testing routine. */ int main (int argc, char **argv) { struct Options options; enum CRStatus status = CR_OK; cr_test_utils_parse_cmd_line (argc, argv, &options); if (options.display_help == TRUE) { display_help (argv[0]); return 0; } if (options.display_about == TRUE) { display_about (argv[0]); return 0; } if (options.files_list == NULL) { display_help (argv[0]); return 0; } status = test_cr_parser_parse ((guchar *) options.files_list[0]); if (status != CR_OK) { fprintf (stdout, "KO\n"); } return 0; }
/** *The entry point of the testing routine. */ int main (int argc, char **argv) { struct Options options; enum CRStatus status = CR_OK; status = test_cr_term_parse_expression_from_buf (); if (status != CR_OK) { g_print ("\ntest \"cr_term_parse_expression_from_buf failed\""); } status = test_cr_declaration_parse (); if (status != CR_OK) { g_print ("\n test \"cr_declaration_parse() failed\"\n"); } status = test_cr_declaration_parse_list (); if (status != CR_OK) { g_print ("\ntest cr_declaration_parse_list() failed\n"); } status = test_cr_statement_ruleset_parse (); if (status != CR_OK) { g_print ("\ntest cr_statement_ruleset_parse() failed\n"); } status = test_cr_statement_at_media_rule_parse (); if (status != CR_OK) { g_print ("\ntest cr_statement_at_media_rule_parse() failed\n"); } test_cr_statement_at_page_rule_parse_from_buf (); if (status != CR_OK) { g_print ("\ntest cr_statement_at_page_rule_parse() failed\n"); return 0; } status = test_cr_statement_at_charset_rule_parse (); if (status != CR_OK) { g_print ("\ntest cr_statement_at_charset_rule_parse() failed\n"); } status = test_cr_statement_font_face_rule_parse_from_buf (); if (status != CR_OK) { g_print ("\ntest cr_statement_font_face_rule_parse_from_buf() failed\n"); } test_cr_statement_at_import_rule_parse_from_buf (); if (status != CR_OK) { g_print ("\ntest cr_statement_at_import_rule() failed\n"); } status = test_cr_statement_parse_from_buf (); if (status != CR_OK) { g_print ("\ntest cr_statement_parse_from_buf() failed\n"); } cr_test_utils_parse_cmd_line (argc, argv, &options); if (options.display_help == TRUE) { display_help (argv[0]); return 0; } if (options.display_about == TRUE) { display_about (argv[0]); return 0; } if (options.files_list == NULL) { display_help (argv[0]); return 0; } status = test_cr_parser_parse (options.files_list[0]); if (status != CR_OK) { g_print ("\nKO\n"); } return 0; }