Ejemplo n.º 1
0
Archivo: tests.c Proyecto: Kutoc/parson
void test_suite_2_with_comments(void) {
    const char *filename = "tests/test_2_comments.txt";
    JSON_Value *root_value = NULL;
    root_value = json_parse_file_with_comments(filename);
    test_suite_2(root_value);
    TEST(json_value_equals(root_value, json_parse_string(json_serialize_to_string(root_value))));
    json_value_free(root_value);
}
Ejemplo n.º 2
0
void test_suite_2_with_comments(void) {
    const char *filename = "tests/test_2_comments.txt";
    JSON_Value *root_value = NULL;
    printf("Testing %s:\n", filename);
    root_value = json_parse_file_with_comments(filename);
    test_suite_2(root_value);
    json_value_free(root_value);
}
Ejemplo n.º 3
0
int main(int argc, const char * argv[]) {
    /* Example function from readme file:       */
    /* print_commits_info("torvalds", "linux"); */
    test_suite_1();
    test_suite_2();
    test_suite_3();
    printf("Tests failed: %d\n", tests_failed);
    printf("Tests passed: %d\n", tests_passed);
    return 0;
}
Ejemplo n.º 4
0
static void run_all_tests(){
    // CONFIGURE UART FOR TESTS OUTPUT
    Open1USART(USART_TX_INT_OFF &
       USART_RX_INT_OFF &
       USART_BRGH_HIGH &
       USART_CONT_RX &
       USART_EIGHT_BIT &
       USART_ASYNCH_MODE &
       USART_ADDEN_OFF,
       8);

    test_suite_1();
    test_suite_2();

    END_TESTS();
}