summaryrefslogtreecommitdiffstats
path: root/UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c
diff options
context:
space:
mode:
Diffstat (limited to 'UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c')
-rw-r--r--UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c b/UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c
index 2dc1d159d5..9bc743ca8e 100644
--- a/UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c
+++ b/UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c
@@ -54,8 +54,9 @@ RunTestSuite (
// Iterate all tests within the suite
//
for (TestEntry = (UNIT_TEST_LIST_ENTRY *)GetFirstNode (&(Suite->TestCaseList));
- (LIST_ENTRY*)TestEntry != &(Suite->TestCaseList);
- TestEntry = (UNIT_TEST_LIST_ENTRY *)GetNextNode (&(Suite->TestCaseList), (LIST_ENTRY *)TestEntry)) {
+ (LIST_ENTRY *)TestEntry != &(Suite->TestCaseList);
+ TestEntry = (UNIT_TEST_LIST_ENTRY *)GetNextNode (&(Suite->TestCaseList), (LIST_ENTRY *)TestEntry))
+ {
Test = &TestEntry->UT;
ParentFramework->CurrentTest = Test;
@@ -67,7 +68,7 @@ RunTestSuite (
// First, check to see whether the test has already been run.
// NOTE: This would generally only be the case if a saved state was detected and loaded.
//
- if (Test->Result != UNIT_TEST_PENDING && Test->Result != UNIT_TEST_RUNNING) {
+ if ((Test->Result != UNIT_TEST_PENDING) && (Test->Result != UNIT_TEST_RUNNING)) {
DEBUG ((DEBUG_VERBOSE, "Test was run on a previous pass. Skipping.\n"));
ParentFramework->CurrentTest = NULL;
continue;
@@ -75,19 +76,19 @@ RunTestSuite (
//
// Next, if we're still running, make sure that our test prerequisites are in place.
- if (Test->Result == UNIT_TEST_PENDING && Test->Prerequisite != NULL) {
+ if ((Test->Result == UNIT_TEST_PENDING) && (Test->Prerequisite != NULL)) {
DEBUG ((DEBUG_VERBOSE, "PREREQ\n"));
if (SetJump (&gUnitTestJumpBuffer) == 0) {
if (Test->Prerequisite (Test->Context) != UNIT_TEST_PASSED) {
DEBUG ((DEBUG_ERROR, "Prerequisite Not Met\n"));
- Test->Result = UNIT_TEST_ERROR_PREREQUISITE_NOT_MET;
- ParentFramework->CurrentTest = NULL;
+ Test->Result = UNIT_TEST_ERROR_PREREQUISITE_NOT_MET;
+ ParentFramework->CurrentTest = NULL;
continue;
}
} else {
DEBUG ((DEBUG_ERROR, "Prerequisite Not Met\n"));
- Test->Result = UNIT_TEST_ERROR_PREREQUISITE_NOT_MET;
- ParentFramework->CurrentTest = NULL;
+ Test->Result = UNIT_TEST_ERROR_PREREQUISITE_NOT_MET;
+ ParentFramework->CurrentTest = NULL;
continue;
}
}
@@ -166,8 +167,9 @@ RunAllTestSuites (
// Iterate all suites
//
for (Suite = (UNIT_TEST_SUITE_LIST_ENTRY *)GetFirstNode (&Framework->TestSuiteList);
- (LIST_ENTRY *)Suite != &Framework->TestSuiteList;
- Suite = (UNIT_TEST_SUITE_LIST_ENTRY *)GetNextNode (&Framework->TestSuiteList, (LIST_ENTRY *)Suite)) {
+ (LIST_ENTRY *)Suite != &Framework->TestSuiteList;
+ Suite = (UNIT_TEST_SUITE_LIST_ENTRY *)GetNextNode (&Framework->TestSuiteList, (LIST_ENTRY *)Suite))
+ {
Status = RunTestSuite (&(Suite->UTS));
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Test Suite Failed with Error. %r\n", Status));