Пример #1
0
int
longBowMain_Impl(int argc, char *argv[argc], ...)
{
    LongBowStatus exitStatus = LONGBOW_STATUS_SUCCEEDED;

    // Perform some processing on the input parameters.

    LongBowConfig *config = longBowConfig_Create(argc, argv, NULL);
    if (config == NULL) {
        return LONGBOW_STATUS_FAILED;
    }
    va_list ap;
    va_start(ap, argv);

    for (LongBowTestRunner *testRunner = va_arg(ap, LongBowTestRunner *); testRunner != NULL; testRunner = va_arg(ap, LongBowTestRunner *)) {
        if (testRunner != NULL) {
            longBowTestRunner_SetConfiguration(testRunner, config);
            longBowTestRunner_Run(testRunner);
            longBowReportTesting_TestRunner(testRunner);

            if (!longBowTestRunner_IsSuccessful(testRunner)) {
                exitStatus = longBowTestRunner_GetStatus(testRunner);
            }
        }
    }
    va_end(ap);

    longBowConfig_Destroy(&config);

    return (int) exitStatus;
}
Пример #2
0
LONGBOW_TEST_CASE(Global, CreateDestroy)
{
    LongBowConfig *config = longBowConfig_Create(0, NULL, NULL);
    
    longBowConfig_Destroy(&config);
}