diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:54:19 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | 7c0ad2c33810ead45b7919f8f8d0e282dae52e71 (patch) | |
tree | 8391fcdaa5269b2223e9f4cb461287c082f32e2a /UnitTestFrameworkPkg/PrivateInclude | |
parent | e5efcf8be8a1bf59aa98875787475e3144ee4cef (diff) | |
download | edk2-7c0ad2c33810ead45b7919f8f8d0e282dae52e71.zip edk2-7c0ad2c33810ead45b7919f8f8d0e282dae52e71.tar.gz edk2-7c0ad2c33810ead45b7919f8f8d0e282dae52e71.tar.bz2 |
UnitTestFrameworkPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the UnitTestFrameworkPkg package
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>
Diffstat (limited to 'UnitTestFrameworkPkg/PrivateInclude')
-rw-r--r-- | UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestPersistenceLib.h | 2 | ||||
-rw-r--r-- | UnitTestFrameworkPkg/PrivateInclude/UnitTestFrameworkTypes.h | 122 |
2 files changed, 62 insertions, 62 deletions
diff --git a/UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestPersistenceLib.h b/UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestPersistenceLib.h index af19ba8..be29e07 100644 --- a/UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestPersistenceLib.h +++ b/UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestPersistenceLib.h @@ -14,7 +14,7 @@ #include <UnitTestFrameworkTypes.h>
-#define UNIT_TEST_PERSISTENCE_LIB_VERSION 1
+#define UNIT_TEST_PERSISTENCE_LIB_VERSION 1
/**
Determines whether a persistence cache already exists for
diff --git a/UnitTestFrameworkPkg/PrivateInclude/UnitTestFrameworkTypes.h b/UnitTestFrameworkPkg/PrivateInclude/UnitTestFrameworkTypes.h index b0e2f61..adce413 100644 --- a/UnitTestFrameworkPkg/PrivateInclude/UnitTestFrameworkTypes.h +++ b/UnitTestFrameworkPkg/PrivateInclude/UnitTestFrameworkTypes.h @@ -15,14 +15,14 @@ ///
/// The maximum length of a string stored in the unit test framework
///
-#define UNIT_TEST_MAX_STRING_LENGTH (120)
+#define UNIT_TEST_MAX_STRING_LENGTH (120)
///
/// The size of a firngerprint used to save/resume execution of a unit test
/// framework. This is the size of a CRC32 value which is 32-bit value.
///
///
-#define UNIT_TEST_FINGERPRINT_SIZE (sizeof (UINT32))
+#define UNIT_TEST_FINGERPRINT_SIZE (sizeof (UINT32))
///
/// The maximum length of a test failure message stored in the unit test
@@ -35,55 +35,55 @@ /// test.
///
typedef UINT32 FAILURE_TYPE;
-#define FAILURETYPE_NOFAILURE (0)
-#define FAILURETYPE_OTHER (1)
-#define FAILURETYPE_ASSERTTRUE (2)
-#define FAILURETYPE_ASSERTFALSE (3)
-#define FAILURETYPE_ASSERTEQUAL (4)
-#define FAILURETYPE_ASSERTNOTEQUAL (5)
-#define FAILURETYPE_ASSERTNOTEFIERROR (6)
-#define FAILURETYPE_ASSERTSTATUSEQUAL (7)
-#define FAILURETYPE_ASSERTNOTNULL (8)
-#define FAILURETYPE_EXPECTASSERT (9)
+#define FAILURETYPE_NOFAILURE (0)
+#define FAILURETYPE_OTHER (1)
+#define FAILURETYPE_ASSERTTRUE (2)
+#define FAILURETYPE_ASSERTFALSE (3)
+#define FAILURETYPE_ASSERTEQUAL (4)
+#define FAILURETYPE_ASSERTNOTEQUAL (5)
+#define FAILURETYPE_ASSERTNOTEFIERROR (6)
+#define FAILURETYPE_ASSERTSTATUSEQUAL (7)
+#define FAILURETYPE_ASSERTNOTNULL (8)
+#define FAILURETYPE_EXPECTASSERT (9)
///
/// Unit Test context structure tracked by the unit test framework.
///
typedef struct {
- CHAR8 *Description;
- CHAR8 *Name; //can't have spaces and should be short
- CHAR8 *Log;
- FAILURE_TYPE FailureType;
- CHAR8 FailureMessage[UNIT_TEST_TESTFAILUREMSG_LENGTH];
- UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE];
- UNIT_TEST_STATUS Result;
- UNIT_TEST_FUNCTION RunTest;
- UNIT_TEST_PREREQUISITE Prerequisite;
- UNIT_TEST_CLEANUP CleanUp;
- UNIT_TEST_CONTEXT Context;
- UNIT_TEST_SUITE_HANDLE ParentSuite;
+ CHAR8 *Description;
+ CHAR8 *Name; // can't have spaces and should be short
+ CHAR8 *Log;
+ FAILURE_TYPE FailureType;
+ CHAR8 FailureMessage[UNIT_TEST_TESTFAILUREMSG_LENGTH];
+ UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE];
+ UNIT_TEST_STATUS Result;
+ UNIT_TEST_FUNCTION RunTest;
+ UNIT_TEST_PREREQUISITE Prerequisite;
+ UNIT_TEST_CLEANUP CleanUp;
+ UNIT_TEST_CONTEXT Context;
+ UNIT_TEST_SUITE_HANDLE ParentSuite;
} UNIT_TEST;
///
/// Structure used to store the set of unit tests in a unit test suite as a list.
///
typedef struct {
- LIST_ENTRY Entry;
- UNIT_TEST UT;
+ LIST_ENTRY Entry;
+ UNIT_TEST UT;
} UNIT_TEST_LIST_ENTRY;
///
/// Unit Test Suite context structure tracked by the unit test framework.
///
typedef struct {
- UINTN NumTests;
- CHAR8 *Title;
- CHAR8 *Name;
- UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE];
- UNIT_TEST_SUITE_SETUP Setup;
- UNIT_TEST_SUITE_TEARDOWN Teardown;
- LIST_ENTRY TestCaseList; // UNIT_TEST_LIST_ENTRY
- UNIT_TEST_FRAMEWORK_HANDLE ParentFramework;
+ UINTN NumTests;
+ CHAR8 *Title;
+ CHAR8 *Name;
+ UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE];
+ UNIT_TEST_SUITE_SETUP Setup;
+ UNIT_TEST_SUITE_TEARDOWN Teardown;
+ LIST_ENTRY TestCaseList; // UNIT_TEST_LIST_ENTRY
+ UNIT_TEST_FRAMEWORK_HANDLE ParentFramework;
} UNIT_TEST_SUITE;
///
@@ -91,57 +91,57 @@ typedef struct { /// as a list.
///
typedef struct {
- LIST_ENTRY Entry;
- UNIT_TEST_SUITE UTS;
+ LIST_ENTRY Entry;
+ UNIT_TEST_SUITE UTS;
} UNIT_TEST_SUITE_LIST_ENTRY;
///
/// Unit Test Framework context structure tracked by the unit test framework.
///
typedef struct {
- CHAR8 *Title;
- CHAR8 *ShortTitle; // This title should contain NO spaces or non-filename characters. Is used in reporting and serialization.
- CHAR8 *VersionString;
- CHAR8 *Log;
- UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE];
- LIST_ENTRY TestSuiteList; // UNIT_TEST_SUITE_LIST_ENTRY
- EFI_TIME StartTime;
- EFI_TIME EndTime;
- UNIT_TEST *CurrentTest;
- VOID *SavedState; // This is an instance of UNIT_TEST_SAVE_HEADER*, if present.
+ CHAR8 *Title;
+ CHAR8 *ShortTitle; // This title should contain NO spaces or non-filename characters. Is used in reporting and serialization.
+ CHAR8 *VersionString;
+ CHAR8 *Log;
+ UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE];
+ LIST_ENTRY TestSuiteList; // UNIT_TEST_SUITE_LIST_ENTRY
+ EFI_TIME StartTime;
+ EFI_TIME EndTime;
+ UNIT_TEST *CurrentTest;
+ VOID *SavedState; // This is an instance of UNIT_TEST_SAVE_HEADER*, if present.
} UNIT_TEST_FRAMEWORK;
///
/// Serialized version of a unit test
///
typedef struct {
- UINT32 Size; // Size of the UNIT_TEST_SAVE_TEST including Log[]
- UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE]; // Fingerprint of the test itself.
- CHAR8 FailureMessage[UNIT_TEST_TESTFAILUREMSG_LENGTH];
- FAILURE_TYPE FailureType;
- UNIT_TEST_STATUS Result;
- CHAR8 Log[];
+ UINT32 Size; // Size of the UNIT_TEST_SAVE_TEST including Log[]
+ UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE]; // Fingerprint of the test itself.
+ CHAR8 FailureMessage[UNIT_TEST_TESTFAILUREMSG_LENGTH];
+ FAILURE_TYPE FailureType;
+ UNIT_TEST_STATUS Result;
+ CHAR8 Log[];
} UNIT_TEST_SAVE_TEST;
///
/// Serialized version of a unit test context
///
typedef struct {
- UINT32 Size; // Size of the UNIT_TEST_SAVE_CONTEXT including Data[]
- UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE]; // Fingerprint of the corresponding test.
- UINT8 Data[]; // Actual data of the context.
+ UINT32 Size; // Size of the UNIT_TEST_SAVE_CONTEXT including Data[]
+ UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE]; // Fingerprint of the corresponding test.
+ UINT8 Data[]; // Actual data of the context.
} UNIT_TEST_SAVE_CONTEXT;
///
/// Serialized version of unit test framework
///
typedef struct {
- UINT8 Version;
- UINT32 SaveStateSize; // Size of the entire serialized buffer.
- UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE]; // Fingerprint of the framework that has been saved.
- EFI_TIME StartTime;
- UINT32 TestCount;
- BOOLEAN HasSavedContext;
+ UINT8 Version;
+ UINT32 SaveStateSize; // Size of the entire serialized buffer.
+ UINT8 Fingerprint[UNIT_TEST_FINGERPRINT_SIZE]; // Fingerprint of the framework that has been saved.
+ EFI_TIME StartTime;
+ UINT32 TestCount;
+ BOOLEAN HasSavedContext;
// UNIT_TEST_SAVE_TEST Tests[]; // Array of structures starts here.
// UNIT_TEST_SAVE_CONTEXT SavedContext[]; // Saved context for the currently running test.
// CHAR8 Log[]; // NOTE: Not yet implemented!!
|