- TestCaseContext_t context = calloc(1,sizeof(s_TestCaseContext_t));
-
- if(NULL == context)
- {
- setErrno(E_TEST_CASE_CONTEXT_ALLOCATION_FAILED);
- return NULL;
- }
-
- context->inputBuffer = Buffer_new();
-
- if(NULL == context->inputBuffer)
- {
- TestCaseContext_free(context);
- return NULL;
- }
-
- context->outputBuffer = Buffer_new();
-
- if(NULL == context->outputBuffer)
- {
- TestCaseContext_free(context);
- return NULL;
- }
-
- context->expectedOutputBuffer = Buffer_new();
-
- if(NULL == context->expectedOutputBuffer)
- {
- TestCaseContext_free(context);
- return NULL;
- }
-
- context->commandLineBuffer = Buffer_new();
-
- if(NULL == context->commandLineBuffer)
- {
- TestCaseContext_free(context);
- return NULL;
- }
-
-
- context->isOutputCheckingEnabled = DEFAULT_OUTPUT_CHECKING_MODE;
- context->isPostOutputCheckingEnabled = DEFAULT_POST_OUTPUT_CHECKING_MODE;
- context->timeoutValue = DEFAULT_TIMEOUT_VALUE;
- context->expectedExitCode = INVALID_EXIT_CODE;
- context->exitCode = INVALID_EXIT_CODE;
- context->name = NULL;
-
- context->runThread = true;
- context->hThread = NULL;
- context->hOutputRead = NULL;
- context->hInputWrite = NULL;
- context->hChildStdInRead = NULL;
- context->hChildStdOutWrite = NULL;
- context->hChildStderr = NULL;
- context->hChildStdoutReadTmp = NULL;
- context->hChildStdinWriteTmp = NULL;
- context->hConsole = NULL;
-
- context->createConsole = false;
- context->exitCodeCheckingEnabled = false;
-
- context->started = false;
-
- memset(&(context->pi),0,sizeof(PROCESS_INFORMATION));
-
- return context;
+ TestCaseContext_t context = calloc(1, sizeof(s_TestCaseContext_t));
+
+ if (NULL == context) {
+ setErrno(E_TEST_CASE_CONTEXT_ALLOCATION_FAILED);
+ return NULL;
+ }
+
+ context->inputBuffer = Buffer_new();
+
+ if (NULL == context->inputBuffer) {
+ TestCaseContext_free(context);
+ return NULL;
+ }
+
+ context->outputBuffer = Buffer_new();
+
+ if (NULL == context->outputBuffer) {
+ TestCaseContext_free(context);
+ return NULL;
+ }
+
+ context->expectedOutputBuffer = Buffer_new();
+
+ if (NULL == context->expectedOutputBuffer) {
+ TestCaseContext_free(context);
+ return NULL;
+ }
+
+ context->commandLineBuffer = Buffer_new();
+
+ if (NULL == context->commandLineBuffer) {
+ TestCaseContext_free(context);
+ return NULL;
+ }
+
+
+ context->isOutputCheckingEnabled = DEFAULT_OUTPUT_CHECKING_MODE;
+ context->isPostOutputCheckingEnabled = DEFAULT_POST_OUTPUT_CHECKING_MODE;
+ context->timeoutValue = DEFAULT_TIMEOUT_VALUE;
+ context->expectedExitCode = INVALID_EXIT_CODE;
+ context->exitCode = INVALID_EXIT_CODE;
+ context->name = NULL;
+
+ context->runThread = true;
+ context->hThread = NULL;
+ context->hOutputRead = NULL;
+ context->hInputWrite = NULL;
+ context->hChildStdInRead = NULL;
+ context->hChildStdOutWrite = NULL;
+ context->hChildStderr = NULL;
+ context->hChildStdoutReadTmp = NULL;
+ context->hChildStdinWriteTmp = NULL;
+ context->hConsole = NULL;
+
+ context->createConsole = false;
+ context->exitCodeCheckingEnabled = false;
+
+ context->started = false;
+
+ memset(&(context->pi), 0, sizeof(PROCESS_INFORMATION));
+
+ return context;