Lines Matching refs:test_id

55 #define TEST_RES(cond, msg, handler_res, test_id)                              \  argument
57 printf("Test %d Failed: %s\n", test_id, msg); \
60 printf("Test %d Passed: %s\n", test_id, msg); \
64 test_handler_called(int handler_called, char *expected_msg, int test_id) in test_handler_called() argument
72 printf("Test %d Failed: Error msg is incorrect\n", test_id); in test_handler_called()
79 printf("Test %d Failed: Error msg is incorrect\n", test_id); in test_handler_called()
86 printf("Test %d Failed: Error msg is incorrect\n", test_id); in test_handler_called()
105 int test_id = 0; in main() local
112 test_id++; in main()
114 handler_res = test_handler_called(0, "", test_id); in main()
115 TEST_RES(res == 0, "Normal error message", handler_res, test_id); in main()
117 "Normal error message Contents", handler_res, test_id); in main()
120 test_id++; in main()
122 handler_res = test_handler_called(0, "", test_id); in main()
123 TEST_RES(res == ERANGE, "Buffer too small", handler_res, test_id); in main()
126 test_id++; in main()
128 handler_res = test_handler_called(1, "strerror_s: dest is NULL", test_id); in main()
129 TEST_RES(res != 0, "Null Destination Pointer", handler_res, test_id); in main()
132 test_id++; in main()
135 1, "strerror_s: dest buffer size is 0 or exceeds RSIZE_MAX", test_id); in main()
136 TEST_RES(res != 0, "Zero-length Buffer", handler_res, test_id); in main()
139 test_id++; in main()
141 handler_res = test_handler_called(0, "", test_id); in main()
142 TEST_RES(res == 0, "Unknown error code", handler_res, test_id); in main()