mirror of https://github.com/acidanthera/audk.git
MdePkg: Apply uncrustify formatting to relevant files
Apply uncrustify formatting to GoogleTest cpp and header files. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Vivian Nowka-Keane <vnowkakeane@linux.microsoft.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
parent
504953ef97
commit
716a3292e0
|
@ -14,10 +14,10 @@ extern "C" {
|
|||
#include <Library/SafeIntLib.h>
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeInt32ToUintn) {
|
||||
TEST (ConversionTestSuite, TestSafeInt32ToUintn) {
|
||||
RETURN_STATUS Status;
|
||||
INT32 Operand;
|
||||
UINTN Result;
|
||||
INT32 Operand;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// If Operand is non-negative, then it's a cast
|
||||
|
@ -36,10 +36,10 @@ TEST(ConversionTestSuite, TestSafeInt32ToUintn) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUint32ToIntn) {
|
||||
TEST (ConversionTestSuite, TestSafeUint32ToIntn) {
|
||||
RETURN_STATUS Status;
|
||||
UINT32 Operand;
|
||||
INTN Result;
|
||||
UINT32 Operand;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If Operand is <= MAX_INTN, then it's a cast
|
||||
|
@ -58,10 +58,10 @@ TEST(ConversionTestSuite, TestSafeUint32ToIntn) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeIntnToInt32) {
|
||||
TEST (ConversionTestSuite, TestSafeIntnToInt32) {
|
||||
RETURN_STATUS Status;
|
||||
INTN Operand;
|
||||
INT32 Result;
|
||||
INTN Operand;
|
||||
INT32 Result;
|
||||
|
||||
//
|
||||
// INTN is same as INT32 in IA32, so this is just a cast
|
||||
|
@ -73,10 +73,10 @@ TEST(ConversionTestSuite, TestSafeIntnToInt32) {
|
|||
ASSERT_EQ (0x5bababab, Result);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeIntnToUint32) {
|
||||
TEST (ConversionTestSuite, TestSafeIntnToUint32) {
|
||||
RETURN_STATUS Status;
|
||||
INTN Operand;
|
||||
UINT32 Result;
|
||||
INTN Operand;
|
||||
UINT32 Result;
|
||||
|
||||
//
|
||||
// If Operand is non-negative, then it's a cast
|
||||
|
@ -95,10 +95,10 @@ TEST(ConversionTestSuite, TestSafeIntnToUint32) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUintnToUint32) {
|
||||
TEST (ConversionTestSuite, TestSafeUintnToUint32) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Operand;
|
||||
UINT32 Result;
|
||||
UINTN Operand;
|
||||
UINT32 Result;
|
||||
|
||||
//
|
||||
// UINTN is same as UINT32 in IA32, so this is just a cast
|
||||
|
@ -110,10 +110,10 @@ TEST(ConversionTestSuite, TestSafeUintnToUint32) {
|
|||
ASSERT_EQ (0xabababab, Result);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUintnToIntn) {
|
||||
TEST (ConversionTestSuite, TestSafeUintnToIntn) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Operand;
|
||||
INTN Result;
|
||||
UINTN Operand;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If Operand is <= MAX_INTN, then it's a cast
|
||||
|
@ -132,10 +132,10 @@ TEST(ConversionTestSuite, TestSafeUintnToIntn) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUintnToInt64) {
|
||||
TEST (ConversionTestSuite, TestSafeUintnToInt64) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Operand;
|
||||
INT64 Result;
|
||||
UINTN Operand;
|
||||
INT64 Result;
|
||||
|
||||
//
|
||||
// UINTN is same as UINT32 in IA32, and UINT32 is a subset of
|
||||
|
@ -148,10 +148,10 @@ TEST(ConversionTestSuite, TestSafeUintnToInt64) {
|
|||
ASSERT_EQ (0xabababab, Result);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeInt64ToIntn) {
|
||||
TEST (ConversionTestSuite, TestSafeInt64ToIntn) {
|
||||
RETURN_STATUS Status;
|
||||
INT64 Operand;
|
||||
INTN Result;
|
||||
INT64 Operand;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If Operand is between MIN_INTN and MAX_INTN2 inclusive, then it's a cast
|
||||
|
@ -179,10 +179,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToIntn) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeInt64ToUintn) {
|
||||
TEST (ConversionTestSuite, TestSafeInt64ToUintn) {
|
||||
RETURN_STATUS Status;
|
||||
INT64 Operand;
|
||||
UINTN Result;
|
||||
INT64 Operand;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// If Operand is between 0 and MAX_UINTN inclusive, then it's a cast
|
||||
|
@ -205,10 +205,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToUintn) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUint64ToIntn) {
|
||||
TEST (ConversionTestSuite, TestSafeUint64ToIntn) {
|
||||
RETURN_STATUS Status;
|
||||
UINT64 Operand;
|
||||
INTN Result;
|
||||
UINT64 Operand;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If Operand is <= MAX_INTN, then it's a cast
|
||||
|
@ -227,10 +227,10 @@ TEST(ConversionTestSuite, TestSafeUint64ToIntn) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUint64ToUintn) {
|
||||
TEST (ConversionTestSuite, TestSafeUint64ToUintn) {
|
||||
RETURN_STATUS Status;
|
||||
UINT64 Operand;
|
||||
UINTN Result;
|
||||
UINT64 Operand;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// If Operand is <= MAX_UINTN, then it's a cast
|
||||
|
@ -249,11 +249,11 @@ TEST(ConversionTestSuite, TestSafeUint64ToUintn) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(AdditionSubtractionTestSuite, TestSafeUintnAdd) {
|
||||
TEST (AdditionSubtractionTestSuite, TestSafeUintnAdd) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Augend;
|
||||
UINTN Addend;
|
||||
UINTN Result;
|
||||
UINTN Augend;
|
||||
UINTN Addend;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// If the result of addition doesn't overflow MAX_UINTN, then it's addition
|
||||
|
@ -274,11 +274,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUintnAdd) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(AdditionSubtractionTestSuite, TestSafeIntnAdd) {
|
||||
TEST (AdditionSubtractionTestSuite, TestSafeIntnAdd) {
|
||||
RETURN_STATUS Status;
|
||||
INTN Augend;
|
||||
INTN Addend;
|
||||
INTN Result;
|
||||
INTN Augend;
|
||||
INTN Addend;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If the result of addition doesn't overflow MAX_INTN
|
||||
|
@ -311,11 +311,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeIntnAdd) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(AdditionSubtractionTestSuite, TestSafeUintnSub) {
|
||||
TEST (AdditionSubtractionTestSuite, TestSafeUintnSub) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Minuend;
|
||||
UINTN Subtrahend;
|
||||
UINTN Result;
|
||||
UINTN Minuend;
|
||||
UINTN Subtrahend;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// If Minuend >= Subtrahend, then it's subtraction
|
||||
|
@ -336,11 +336,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUintnSub) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(AdditionSubtractionTestSuite, TestSafeIntnSub) {
|
||||
TEST (AdditionSubtractionTestSuite, TestSafeIntnSub) {
|
||||
RETURN_STATUS Status;
|
||||
INTN Minuend;
|
||||
INTN Subtrahend;
|
||||
INTN Result;
|
||||
INTN Minuend;
|
||||
INTN Subtrahend;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If the result of subtractions doesn't overflow MAX_INTN or
|
||||
|
@ -373,11 +373,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeIntnSub) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(MultiplicationTestSuite, TestSafeUintnMult) {
|
||||
TEST (MultiplicationTestSuite, TestSafeUintnMult) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Multiplicand;
|
||||
UINTN Multiplier;
|
||||
UINTN Result;
|
||||
UINTN Multiplicand;
|
||||
UINTN Multiplier;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// If the result of multiplication doesn't overflow MAX_UINTN, it will succeed
|
||||
|
@ -398,11 +398,11 @@ TEST(MultiplicationTestSuite, TestSafeUintnMult) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(MultiplicationTestSuite, TestSafeIntnMult) {
|
||||
TEST (MultiplicationTestSuite, TestSafeIntnMult) {
|
||||
RETURN_STATUS Status;
|
||||
INTN Multiplicand;
|
||||
INTN Multiplier;
|
||||
INTN Result;
|
||||
INTN Multiplicand;
|
||||
INTN Multiplier;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If the result of multiplication doesn't overflow MAX_INTN and doesn't
|
||||
|
|
|
@ -14,10 +14,10 @@ extern "C" {
|
|||
#include <Library/SafeIntLib.h>
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeInt32ToUintn) {
|
||||
TEST (ConversionTestSuite, TestSafeInt32ToUintn) {
|
||||
RETURN_STATUS Status;
|
||||
INT32 Operand;
|
||||
UINTN Result;
|
||||
INT32 Operand;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// If Operand is non-negative, then it's a cast
|
||||
|
@ -36,10 +36,10 @@ TEST(ConversionTestSuite, TestSafeInt32ToUintn) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUint32ToIntn) {
|
||||
TEST (ConversionTestSuite, TestSafeUint32ToIntn) {
|
||||
RETURN_STATUS Status;
|
||||
UINT32 Operand;
|
||||
INTN Result;
|
||||
UINT32 Operand;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// For x64, INTN is same as INT64 which is a superset of INT32
|
||||
|
@ -56,10 +56,10 @@ TEST(ConversionTestSuite, TestSafeUint32ToIntn) {
|
|||
ASSERT_EQ (0xabababab, Result);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeIntnToInt32) {
|
||||
TEST (ConversionTestSuite, TestSafeIntnToInt32) {
|
||||
RETURN_STATUS Status;
|
||||
INTN Operand;
|
||||
INT32 Result;
|
||||
INTN Operand;
|
||||
INT32 Result;
|
||||
|
||||
//
|
||||
// If Operand is between MIN_INT32 and MAX_INT32 inclusive, then it's a cast
|
||||
|
@ -87,10 +87,10 @@ TEST(ConversionTestSuite, TestSafeIntnToInt32) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeIntnToUint32) {
|
||||
TEST (ConversionTestSuite, TestSafeIntnToUint32) {
|
||||
RETURN_STATUS Status;
|
||||
INTN Operand;
|
||||
UINT32 Result;
|
||||
INTN Operand;
|
||||
UINT32 Result;
|
||||
|
||||
//
|
||||
// If Operand is between 0 and MAX_UINT32 inclusive, then it's a cast
|
||||
|
@ -113,10 +113,10 @@ TEST(ConversionTestSuite, TestSafeIntnToUint32) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUintnToUint32) {
|
||||
TEST (ConversionTestSuite, TestSafeUintnToUint32) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Operand;
|
||||
UINT32 Result;
|
||||
UINTN Operand;
|
||||
UINT32 Result;
|
||||
|
||||
//
|
||||
// If Operand is <= MAX_UINT32, then it's a cast
|
||||
|
@ -135,10 +135,10 @@ TEST(ConversionTestSuite, TestSafeUintnToUint32) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUintnToIntn) {
|
||||
TEST (ConversionTestSuite, TestSafeUintnToIntn) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Operand;
|
||||
INTN Result;
|
||||
UINTN Operand;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If Operand is <= MAX_INTN (0x7fff_ffff_ffff_ffff), then it's a cast
|
||||
|
@ -157,10 +157,10 @@ TEST(ConversionTestSuite, TestSafeUintnToIntn) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUintnToInt64) {
|
||||
TEST (ConversionTestSuite, TestSafeUintnToInt64) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Operand;
|
||||
INT64 Result;
|
||||
UINTN Operand;
|
||||
INT64 Result;
|
||||
|
||||
//
|
||||
// If Operand is <= MAX_INT64, then it's a cast
|
||||
|
@ -179,10 +179,10 @@ TEST(ConversionTestSuite, TestSafeUintnToInt64) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeInt64ToIntn) {
|
||||
TEST (ConversionTestSuite, TestSafeInt64ToIntn) {
|
||||
RETURN_STATUS Status;
|
||||
INT64 Operand;
|
||||
INTN Result;
|
||||
INT64 Operand;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// INTN is same as INT64 in x64, so this is just a cast
|
||||
|
@ -194,10 +194,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToIntn) {
|
|||
ASSERT_EQ (0x5babababefefefef, Result);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeInt64ToUintn) {
|
||||
TEST (ConversionTestSuite, TestSafeInt64ToUintn) {
|
||||
RETURN_STATUS Status;
|
||||
INT64 Operand;
|
||||
UINTN Result;
|
||||
INT64 Operand;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// If Operand is non-negative, then it's a cast
|
||||
|
@ -216,10 +216,10 @@ TEST(ConversionTestSuite, TestSafeInt64ToUintn) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUint64ToIntn) {
|
||||
TEST (ConversionTestSuite, TestSafeUint64ToIntn) {
|
||||
RETURN_STATUS Status;
|
||||
UINT64 Operand;
|
||||
INTN Result;
|
||||
UINT64 Operand;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If Operand is <= MAX_INTN (0x7fff_ffff_ffff_ffff), then it's a cast
|
||||
|
@ -238,10 +238,10 @@ TEST(ConversionTestSuite, TestSafeUint64ToIntn) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(ConversionTestSuite, TestSafeUint64ToUintn) {
|
||||
TEST (ConversionTestSuite, TestSafeUint64ToUintn) {
|
||||
RETURN_STATUS Status;
|
||||
UINT64 Operand;
|
||||
UINTN Result;
|
||||
UINT64 Operand;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// UINTN is same as UINT64 in x64, so this is just a cast
|
||||
|
@ -253,11 +253,11 @@ TEST(ConversionTestSuite, TestSafeUint64ToUintn) {
|
|||
ASSERT_EQ (0xababababefefefef, Result);
|
||||
}
|
||||
|
||||
TEST(AdditionSubtractionTestSuite, TestSafeUintnAdd) {
|
||||
TEST (AdditionSubtractionTestSuite, TestSafeUintnAdd) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Augend;
|
||||
UINTN Addend;
|
||||
UINTN Result;
|
||||
UINTN Augend;
|
||||
UINTN Addend;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// If the result of addition doesn't overflow MAX_UINTN, then it's addition
|
||||
|
@ -278,11 +278,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUintnAdd) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(AdditionSubtractionTestSuite, TestSafeIntnAdd) {
|
||||
TEST (AdditionSubtractionTestSuite, TestSafeIntnAdd) {
|
||||
RETURN_STATUS Status;
|
||||
INTN Augend;
|
||||
INTN Addend;
|
||||
INTN Result;
|
||||
INTN Augend;
|
||||
INTN Addend;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If the result of addition doesn't overflow MAX_INTN
|
||||
|
@ -315,11 +315,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeIntnAdd) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(AdditionSubtractionTestSuite, TestSafeUintnSub) {
|
||||
TEST (AdditionSubtractionTestSuite, TestSafeUintnSub) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Minuend;
|
||||
UINTN Subtrahend;
|
||||
UINTN Result;
|
||||
UINTN Minuend;
|
||||
UINTN Subtrahend;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// If Minuend >= Subtrahend, then it's subtraction
|
||||
|
@ -340,11 +340,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeUintnSub) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(AdditionSubtractionTestSuite, TestSafeIntnSub) {
|
||||
TEST (AdditionSubtractionTestSuite, TestSafeIntnSub) {
|
||||
RETURN_STATUS Status;
|
||||
INTN Minuend;
|
||||
INTN Subtrahend;
|
||||
INTN Result;
|
||||
INTN Minuend;
|
||||
INTN Subtrahend;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If the result of subtractions doesn't overflow MAX_INTN or
|
||||
|
@ -377,11 +377,11 @@ TEST(AdditionSubtractionTestSuite, TestSafeIntnSub) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(MultiplicationTestSuite, TestSafeUintnMult) {
|
||||
TEST (MultiplicationTestSuite, TestSafeUintnMult) {
|
||||
RETURN_STATUS Status;
|
||||
UINTN Multiplicand;
|
||||
UINTN Multiplier;
|
||||
UINTN Result;
|
||||
UINTN Multiplicand;
|
||||
UINTN Multiplier;
|
||||
UINTN Result;
|
||||
|
||||
//
|
||||
// If the result of multiplication doesn't overflow MAX_UINTN, it will succeed
|
||||
|
@ -402,11 +402,11 @@ TEST(MultiplicationTestSuite, TestSafeUintnMult) {
|
|||
ASSERT_EQ (RETURN_BUFFER_TOO_SMALL, Status);
|
||||
}
|
||||
|
||||
TEST(MultiplicationTestSuite, TestSafeIntnMult) {
|
||||
TEST (MultiplicationTestSuite, TestSafeIntnMult) {
|
||||
RETURN_STATUS Status;
|
||||
INTN Multiplicand;
|
||||
INTN Multiplier;
|
||||
INTN Result;
|
||||
INTN Multiplicand;
|
||||
INTN Multiplier;
|
||||
INTN Result;
|
||||
|
||||
//
|
||||
// If the result of multiplication doesn't overflow MAX_INTN and doesn't
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -11,9 +11,9 @@
|
|||
#include <Library/GoogleTestLib.h>
|
||||
#include <Library/FunctionMockLib.h>
|
||||
extern "C" {
|
||||
#include <Pi/PiMultiPhase.h>
|
||||
#include <Uefi.h>
|
||||
#include <Library/HobLib.h>
|
||||
#include <Pi/PiMultiPhase.h>
|
||||
#include <Uefi.h>
|
||||
#include <Library/HobLib.h>
|
||||
}
|
||||
|
||||
struct MockHobLib {
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
#include <Library/GoogleTestLib.h>
|
||||
#include <Library/FunctionMockLib.h>
|
||||
extern "C" {
|
||||
#include <PiPei.h>
|
||||
#include <Uefi.h>
|
||||
#include <Library/PeiServicesLib.h>
|
||||
#include <PiPei.h>
|
||||
#include <Uefi.h>
|
||||
#include <Library/PeiServicesLib.h>
|
||||
}
|
||||
|
||||
struct MockPeiServicesLib {
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
#include <Library/GoogleTestLib.h>
|
||||
#include <Library/FunctionMockLib.h>
|
||||
extern "C" {
|
||||
#include <Uefi.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Uefi.h>
|
||||
#include <Library/UefiLib.h>
|
||||
}
|
||||
|
||||
struct MockUefiLib {
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
#include <Library/GoogleTestLib.h>
|
||||
#include <Library/FunctionMockLib.h>
|
||||
extern "C" {
|
||||
#include <Uefi.h>
|
||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||
#include <Uefi.h>
|
||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||
}
|
||||
|
||||
struct MockUefiRuntimeServicesTableLib {
|
||||
|
|
|
@ -7,24 +7,24 @@
|
|||
|
||||
#include <GoogleTest/Library/MockHobLib.h>
|
||||
|
||||
MOCK_INTERFACE_DEFINITION(MockHobLib);
|
||||
MOCK_INTERFACE_DEFINITION (MockHobLib);
|
||||
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, GetHobList, 0, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, GetNextHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, GetFirstHob, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, GetNextGuidHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, GetFirstGuidHob, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, GetBootModeHob, 0, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildModuleHob, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildResourceDescriptorWithOwnerHob, 5, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildResourceDescriptorHob, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildGuidHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildGuidDataHob, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildFvHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildFv2Hob, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildFv3Hob, 6, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildCvHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildCpuHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildStackHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildBspStoreHob, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockHobLib, BuildMemoryAllocationHob, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, GetHobList, 0, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, GetNextHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, GetFirstHob, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, GetNextGuidHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, GetFirstGuidHob, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, GetBootModeHob, 0, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildModuleHob, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildResourceDescriptorWithOwnerHob, 5, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildResourceDescriptorHob, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildGuidHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildGuidDataHob, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildFvHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildFv2Hob, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildFv3Hob, 6, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildCvHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildCpuHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildStackHob, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildBspStoreHob, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockHobLib, BuildMemoryAllocationHob, 3, EFIAPI);
|
||||
|
|
|
@ -7,30 +7,30 @@
|
|||
|
||||
#include <GoogleTest/Library/MockPeiServicesLib.h>
|
||||
|
||||
MOCK_INTERFACE_DEFINITION(MockPeiServicesLib);
|
||||
MOCK_INTERFACE_DEFINITION (MockPeiServicesLib);
|
||||
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesInstallPpi, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesReInstallPpi, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesLocatePpi, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesNotifyPpi, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesGetBootMode, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesSetBootMode, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesGetHobList, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesCreateHob, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsFindNextVolume, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsFindNextFile, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsFindSectionData, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsFindSectionData3, 5, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesInstallPeiMemory, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesAllocatePages, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFreePages, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesAllocatePool, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesResetSystem, 0, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsFindFileByName, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsGetFileInfo, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsGetFileInfo2, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesFfsGetVolumeInfo, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesRegisterForShadow, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesInstallFvInfoPpi, 5, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesInstallFvInfo2Ppi, 6, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockPeiServicesLib, PeiServicesResetSystem2, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesInstallPpi, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesReInstallPpi, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesLocatePpi, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesNotifyPpi, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesGetBootMode, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesSetBootMode, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesGetHobList, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesCreateHob, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsFindNextVolume, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsFindNextFile, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsFindSectionData, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsFindSectionData3, 5, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesInstallPeiMemory, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesAllocatePages, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFreePages, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesAllocatePool, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesResetSystem, 0, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsFindFileByName, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsGetFileInfo, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsGetFileInfo2, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesFfsGetVolumeInfo, 2, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesRegisterForShadow, 1, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesInstallFvInfoPpi, 5, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesInstallFvInfo2Ppi, 6, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockPeiServicesLib, PeiServicesResetSystem2, 4, EFIAPI);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
**/
|
||||
#include <GoogleTest/Library/MockUefiLib.h>
|
||||
|
||||
MOCK_INTERFACE_DEFINITION(MockUefiLib);
|
||||
MOCK_INTERFACE_DEFINITION (MockUefiLib);
|
||||
|
||||
MOCK_FUNCTION_DEFINITION(MockUefiLib, GetVariable2, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockUefiLib, GetEfiGlobalVariable2, 3, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockUefiLib, GetVariable2, 4, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockUefiLib, GetEfiGlobalVariable2, 3, EFIAPI);
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
**/
|
||||
#include <GoogleTest/Library/MockUefiRuntimeServicesTableLib.h>
|
||||
|
||||
MOCK_INTERFACE_DEFINITION(MockUefiRuntimeServicesTableLib);
|
||||
MOCK_INTERFACE_DEFINITION (MockUefiRuntimeServicesTableLib);
|
||||
|
||||
MOCK_FUNCTION_DEFINITION(MockUefiRuntimeServicesTableLib, gRT_GetVariable, 5, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION(MockUefiRuntimeServicesTableLib, gRT_SetVariable, 5, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_GetVariable, 5, EFIAPI);
|
||||
MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_SetVariable, 5, EFIAPI);
|
||||
|
||||
static EFI_RUNTIME_SERVICES localRt = {
|
||||
{0}, // EFI_TABLE_HEADER
|
||||
static EFI_RUNTIME_SERVICES localRt = {
|
||||
{ 0 }, // EFI_TABLE_HEADER
|
||||
|
||||
NULL, // EFI_GET_TIME
|
||||
NULL, // EFI_SET_TIME
|
||||
|
@ -36,5 +36,5 @@ static EFI_RUNTIME_SERVICES localRt = {
|
|||
};
|
||||
|
||||
extern "C" {
|
||||
EFI_RUNTIME_SERVICES* gRT = &localRt;
|
||||
EFI_RUNTIME_SERVICES *gRT = &localRt;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue