From df8b5c32fdc89fd5f0dc719dc6653974ab006b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Tue, 14 May 2024 16:52:32 +0200 Subject: [PATCH] Fixed BigInt test cases --- tests/UBigIntTestCases.pas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/UBigIntTestCases.pas b/tests/UBigIntTestCases.pas index aaccfd2..1ecc16e 100644 --- a/tests/UBigIntTestCases.pas +++ b/tests/UBigIntTestCases.pas @@ -127,7 +127,7 @@ type TBigIntSumTestCase = class(TTestCase) private procedure Test(const AHexValueLeft, AHexValueRight, AHexValueSum: string); - public + published procedure TestShort; procedure TestPositivePlusPositive; procedure TestNegativePlusNegative; @@ -691,7 +691,7 @@ procedure TBigIntShiftLeftTestCase.TestShort; begin // BIN 101 // BIN 101000 - Test('5', 3, '40'); + Test('5', 3, '28'); end; procedure TBigIntShiftLeftTestCase.TestShortWithCarry; @@ -734,7 +734,7 @@ begin a := TBigInt.FromInt64(AValue); b := TBigInt.FromInt64(AValue); AssertTrue('Two BigInt from ''' + IntToStr(AValue) + ''' were not equal.', a = b); - AssertFalse('Two BigInt from ''' + IntToStr(AValue) + ''' were not equal.', a <> b); + AssertFalse('Two BigInt from ''' + IntToStr(AValue) + ''' were un-equal.', a <> b); end; procedure TBigIntEqualityTestCase.TestEqualHex(const AHexValue: string); @@ -744,7 +744,7 @@ begin a := TBigInt.FromHexadecimalString(AHexValue); b := TBigInt.FromHexadecimalString(AHexValue); AssertTrue('Two BigInt from ''' + AHexValue + ''' were not equal.', a = b); - AssertFalse('Two BigInt from ''' + AHexValue + ''' were not equal.', a <> b); + AssertFalse('Two BigInt from ''' + AHexValue + ''' were un-equal.', a <> b); end; procedure TBigIntEqualityTestCase.TestNotEqualHex(const AHexValueLeft, AHexValueRight: string); @@ -753,7 +753,7 @@ var begin a := TBigInt.FromHexadecimalString(AHexValueLeft); b := TBigInt.FromHexadecimalString(AHexValueRight); - AssertTrue('BigInt from ''' + AHexValueLeft + ''' and from ''' + AHexValueRight + ''' were equal.', + AssertTrue('BigInt from ''' + AHexValueLeft + ''' and from ''' + AHexValueRight + ''' were not un-equal.', a <> b); AssertFalse('BigInt from ''' + AHexValueLeft + ''' and from ''' + AHexValueRight + ''' were equal.', a = b);