Beispiel #1
0
static void hdlc_tests(void)
{
    printf("HDLC module tests\n");

    if (test_hdlc_modes())
    {
        printf("Tests failed\n");
        exit(2);
    }
    if (test_hdlc_frame_length_error_handling())
    {
        printf("Tests failed\n");
        exit(2);
    }
    if (test_hdlc_crc_error_handling())
    {
        printf("Tests failed\n");
        exit(2);
    }
    if (test_hdlc_abort_handling())
    {
        printf("Tests failed\n");
        exit(2);
    }
#if 0
    if (test_hdlc_octet_count_handling())
    {
        printf("Tests failed\n");
        exit(2);
    }
#endif
    printf("Tests passed.\n");
}
Beispiel #2
0
int main(int argc, char *argv[])
{
    printf("HDLC module tests\n");

    if (test_hdlc_modes())
    {
        printf("Tests failed\n");
        exit(2);
    }
    if (test_hdlc_frame_length_error_handling())
    {
        printf("Tests failed\n");
        exit(2);
    }
    if (test_hdlc_crc_error_handling())
    {
        printf("Tests failed\n");
        exit(2);
    }
    if (test_hdlc_abort_handling())
    {
        printf("Tests failed\n");
        exit(2);
    }
#if 0
    if (test_hdlc_octet_count_handling())
    {
        printf("Tests failed\n");
        exit(2);
    }
#endif
    printf("Tests passed.\n");
    return  0;
}