diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/edk2/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.h | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/edk2/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.h')
-rw-r--r-- | roms/edk2/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.h | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/roms/edk2/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.h b/roms/edk2/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.h new file mode 100644 index 000000000..7957c99a8 --- /dev/null +++ b/roms/edk2/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.h @@ -0,0 +1,123 @@ +/** @file
+ UEFI OS based application for unit testing the SafeIntLib.
+
+ Copyright (c) Microsoft Corporation.<BR>
+ Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _TEST_BASE_SAFE_INT_LIB_H_
+#define _TEST_BASE_SAFE_INT_LIB_H_
+
+#include <PiPei.h>
+#include <Uefi.h>
+#include <Library/UefiLib.h>
+#include <Library/DebugLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/UnitTestLib.h>
+#include <Library/SafeIntLib.h>
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeInt32ToUintn(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeUint32ToIntn(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeIntnToInt32(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeIntnToUint32(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeUintnToUint32(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeUintnToIntn(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeUintnToInt64(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeInt64ToIntn(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeInt64ToUintn(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeUint64ToIntn(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeUint64ToUintn(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeUintnAdd(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeIntnAdd(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeUintnSub(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeIntnSub(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeUintnMult(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+UNIT_TEST_STATUS
+EFIAPI
+TestSafeIntnMult(
+ IN UNIT_TEST_CONTEXT Context
+ );
+
+#endif
|