35 Operand = (-1537977259);
39 return UNIT_TEST_PASSED;
64 Operand = (0xabababab);
68 return UNIT_TEST_PASSED;
90 return UNIT_TEST_PASSED;
106 Operand = 0x5bababab;
115 Operand = (-1537977259);
119 return UNIT_TEST_PASSED;
124TestSafeUintnToUint32 (
135 Operand = 0xabababab;
141 return UNIT_TEST_PASSED;
157 Operand = 0x5bababab;
166 Operand = (0xabababab);
170 return UNIT_TEST_PASSED;
175TestSafeUintnToInt64 (
187 Operand = 0xabababab;
193 return UNIT_TEST_PASSED;
209 Operand = 0x5bababab;
215 Operand = (-1537977259);
223 Operand = (0x5babababefefefef);
227 Operand = (-6605562033422200815);
231 return UNIT_TEST_PASSED;
236TestSafeInt64ToUintn (
247 Operand = 0xabababab;
256 Operand = (0x5babababefefefef);
260 Operand = (-6605562033422200815);
264 return UNIT_TEST_PASSED;
269TestSafeUint64ToIntn (
280 Operand = 0x5bababab;
289 Operand = (0xababababefefefef);
293 return UNIT_TEST_PASSED;
298TestSafeUint64ToUintn (
309 Operand = 0xabababab;
318 Operand = (0xababababefefefef);
322 return UNIT_TEST_PASSED;
354 return UNIT_TEST_PASSED;
379 Augend = (-976894522);
380 Addend = (-976894522);
393 Augend = (-1515870810);
394 Addend = (-1515870810);
398 return UNIT_TEST_PASSED;
415 Minuend = 0x5a5a5a5a;
416 Subtrahend = 0x3b3b3b3b;
425 Minuend = 0x5a5a5a5a;
426 Subtrahend = 0x6d6d6d6d;
430 return UNIT_TEST_PASSED;
448 Minuend = 0x5a5a5a5a;
449 Subtrahend = 0x3a3a3a3a;
451 Status =
SafeIntnSub (Minuend, Subtrahend, &Result);
455 Minuend = 0x3a3a3a3a;
456 Subtrahend = 0x5a5a5a5a;
457 Status =
SafeIntnSub (Minuend, Subtrahend, &Result);
464 Minuend = (-2054847098);
465 Subtrahend = 2054847098;
466 Status =
SafeIntnSub (Minuend, Subtrahend, &Result);
469 Minuend = (2054847098);
470 Subtrahend = (-2054847098);
471 Status =
SafeIntnSub (Minuend, Subtrahend, &Result);
474 return UNIT_TEST_PASSED;
491 Multiplicand = 0xa122a;
501 Multiplicand = 0xa122a;
506 return UNIT_TEST_PASSED;
524 Multiplicand = 0x123456;
527 Status =
SafeIntnMult (Multiplicand, Multiplier, &Result);
534 Multiplicand = 0x123456;
536 Status =
SafeIntnMult (Multiplicand, Multiplier, &Result);
539 return UNIT_TEST_PASSED;
#define RETURN_BUFFER_TOO_SMALL
RETURN_STATUS EFIAPI SafeInt64ToIntn(IN INT64 Operand, OUT INTN *Result)
RETURN_STATUS EFIAPI SafeUint32ToIntn(IN UINT32 Operand, OUT INTN *Result)
RETURN_STATUS EFIAPI SafeUintnAdd(IN UINTN Augend, IN UINTN Addend, OUT UINTN *Result)
RETURN_STATUS EFIAPI SafeIntnToInt32(IN INTN Operand, OUT INT32 *Result)
RETURN_STATUS EFIAPI SafeUintnMult(IN UINTN Multiplicand, IN UINTN Multiplier, OUT UINTN *Result)
RETURN_STATUS EFIAPI SafeUintnToIntn(IN UINTN Operand, OUT INTN *Result)
RETURN_STATUS EFIAPI SafeIntnToUint32(IN INTN Operand, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeUintnToUint32(IN UINTN Operand, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeIntnMult(IN INTN Multiplicand, IN INTN Multiplier, OUT INTN *Result)
RETURN_STATUS EFIAPI SafeIntnSub(IN INTN Minuend, IN INTN Subtrahend, OUT INTN *Result)
RETURN_STATUS EFIAPI SafeUint64ToIntn(IN UINT64 Operand, OUT INTN *Result)
RETURN_STATUS EFIAPI SafeUintnToInt64(IN UINTN Operand, OUT INT64 *Result)
RETURN_STATUS EFIAPI SafeInt32ToUintn(IN INT32 Operand, OUT UINTN *Result)
RETURN_STATUS EFIAPI SafeIntnAdd(IN INTN Augend, IN INTN Addend, OUT INTN *Result)
RETURN_STATUS EFIAPI SafeInt64ToUintn(IN INT64 Operand, OUT UINTN *Result)
RETURN_STATUS EFIAPI SafeUint64ToUintn(IN UINT64 Operand, OUT UINTN *Result)
RETURN_STATUS EFIAPI SafeUintnSub(IN UINTN Minuend, IN UINTN Subtrahend, OUT UINTN *Result)
#define UT_ASSERT_EQUAL(ValueA, ValueB)
#define UT_ASSERT_NOT_EFI_ERROR(Status)