123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896 |
- type
- { TSInt64Bit1Test }
- TSInt64Bit1Test = class(TSInt64DivTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit1ModTest }
- TSInt64Bit1ModTest = class(TSInt64ModTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit10Test }
- TSInt64Bit10Test = class(TSInt64DivTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit10ModTest }
- TSInt64Bit10ModTest = class(TSInt64ModTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit18Test }
- TSInt64Bit18Test = class(TSInt64DivTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit18ModTest }
- TSInt64Bit18ModTest = class(TSInt64ModTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit24Test }
- TSInt64Bit24Test = class(TSInt64DivTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit24ModTest }
- TSInt64Bit24ModTest = class(TSInt64ModTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit100Test }
- TSInt64Bit100Test = class(TSInt64DivTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit100ModTest }
- TSInt64Bit100ModTest = class(TSInt64ModTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit153Test }
- const
- FS64_153Input: array[$0..$F] of Int64 =
- (0, 1, 152, 153, 154, -1, -152, -153, -154,
- 8000000000000000117, 8000000000000000118, 8000000000000000119,
- -8000000000000000117, -8000000000000000118, -8000000000000000119,
- Int64($8000000000000000));
- type
- TSInt64Bit153Test = class(TSInt64DivTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit153ModTest }
- TSInt64Bit153ModTest = class(TSInt64ModTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit1461Test }
- const
- FS64_1461Input: array[$0..$F] of Int64 =
- (0, 1, 1460, 1461, 1462, -1, -1460, -1461, -1462,
- 8000000000000000582, 8000000000000000583, 8000000000000000584,
- -8000000000000000582, -8000000000000000583, -8000000000000000584,
- Int64($8000000000000000));
- type
- TSInt64Bit1461Test = class(TSInt64DivTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit1461ModTest }
- TSInt64Bit1461ModTest = class(TSInt64ModTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit10000Test }
- const
- FS64_10000Input: array[$0..$F] of Int64 =
- (0, 1, 9999, 10000, 10001, -1, -9999, -10000, -10001,
- 7999999999999999999, 8000000000000000000, 8000000000000000001,
- -7999999999999999999, -8000000000000000000, -8000000000000000001,
- Int64($8000000000000000));
- type
- TSInt64Bit10000Test = class(TSInt64DivTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit10000ModTest }
- TSInt64Bit10000ModTest = class(TSInt64ModTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
-
- { TSInt64Bit86400000Test }
- const
- FS64_86400000Input: array[$0..$F] of Int64 =
- (0, 1, 86399999, 86400000, 86400001, -1, -86399999, -86400000, -86400001,
- 8639999999999999999, 8640000000000000000, 8640000000000000001,
- -8639999999999999999, -8640000000000000000, -8640000000000000001,
- Int64($8000000000000000));
- type
- TSInt64Bit86400000Test = class(TSInt64DivTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit86400000ModTest }
- TSInt64Bit86400000ModTest = class(TSInt64ModTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit3ModCmpTest }
- TSInt64Bit3ModCmpTest = class(TSInt64ModCmpTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit10000ModCmpTest }
- TSInt64Bit10000ModCmpTest = class(TSInt64ModCmpTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit86400000ModCmpTest }
- TSInt64Bit86400000ModCmpTest = class(TSInt64ModCmpTest)
- protected
- function GetDivisor: Int64; override;
- procedure DoTestIteration(Iteration: Integer); override;
- public
- function TestTitle: shortstring; override;
- end;
- { TSInt64Bit1Test }
- function TSInt64Bit1Test.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit division by 1';
- end;
- function TSInt64Bit1Test.GetDivisor: Int64;
- begin
- Result := 1;
- end;
- procedure TSInt64Bit1Test.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- case Index of
- 0:
- Numerator := Int64($8000000000000000);
- 1:
- Numerator := Int64($8000000000000006);
- 2:
- Numerator := Int64($8000000000000007);
- 253:
- Numerator := Int64($7FFFFFFFFFFFFFF9);
- 254:
- Numerator := Int64($7FFFFFFFFFFFFFFA);
- 255:
- Numerator := Int64($7FFFFFFFFFFFFFFF);
- else
- Numerator := Index - 128;
- end;
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator div 1;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit1ModTest }
- function TSInt64Bit1ModTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit modulus by 1';
- end;
- function TSInt64Bit1ModTest.GetDivisor: Int64;
- begin
- Result := 1;
- end;
- procedure TSInt64Bit1ModTest.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- case Index of
- 0:
- Numerator := Int64($8000000000000000);
- 1:
- Numerator := Int64($8000000000000006);
- 2:
- Numerator := Int64($8000000000000007);
- 253:
- Numerator := Int64($7FFFFFFFFFFFFFF9);
- 254:
- Numerator := Int64($7FFFFFFFFFFFFFFA);
- 255:
- Numerator := Int64($7FFFFFFFFFFFFFFF);
- else
- Numerator := Index - 128;
- end;
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator mod 1;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit10Test }
- function TSInt64Bit10Test.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit division by 10';
- end;
- function TSInt64Bit10Test.GetDivisor: Int64;
- begin
- Result := 10;
- end;
- procedure TSInt64Bit10Test.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- case Index of
- 0:
- Numerator := Int64($8000000000000000);
- 1:
- Numerator := Int64($8000000000000006);
- 2:
- Numerator := Int64($8000000000000007);
- 253:
- Numerator := Int64($7FFFFFFFFFFFFFF9);
- 254:
- Numerator := Int64($7FFFFFFFFFFFFFFA);
- 255:
- Numerator := Int64($7FFFFFFFFFFFFFFF);
- else
- Numerator := Index - 128;
- end;
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator div 10;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit10ModTest }
- function TSInt64Bit10ModTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit modulus by 10';
- end;
- function TSInt64Bit10ModTest.GetDivisor: Int64;
- begin
- Result := 10;
- end;
- procedure TSInt64Bit10ModTest.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- case Index of
- 0:
- Numerator := Int64($8000000000000000);
- 1:
- Numerator := Int64($8000000000000006);
- 2:
- Numerator := Int64($8000000000000007);
- 253:
- Numerator := Int64($7FFFFFFFFFFFFFF9);
- 254:
- Numerator := Int64($7FFFFFFFFFFFFFFA);
- 255:
- Numerator := Int64($7FFFFFFFFFFFFFFF);
- else
- Numerator := Index - 128;
- end;
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator mod 10;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit18Test }
- function TSInt64Bit18Test.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit division by 18';
- end;
- function TSInt64Bit18Test.GetDivisor: Int64;
- begin
- Result := 18;
- end;
- procedure TSInt64Bit18Test.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := Index - 128;
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator div 18;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit18ModTest }
- function TSInt64Bit18ModTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit modulus by 18';
- end;
- function TSInt64Bit18ModTest.GetDivisor: Int64;
- begin
- Result := 18;
- end;
- procedure TSInt64Bit18ModTest.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := Index - 128;
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator mod 18;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit24Test }
- function TSInt64Bit24Test.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit division by 24';
- end;
- function TSInt64Bit24Test.GetDivisor: Int64;
- begin
- Result := 24;
- end;
- procedure TSInt64Bit24Test.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := Index - 128;
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator div 24;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit24ModTest }
- function TSInt64Bit24ModTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit modulus by 24';
- end;
- function TSInt64Bit24ModTest.GetDivisor: Int64;
- begin
- Result := 24;
- end;
- procedure TSInt64Bit24ModTest.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := Index - 128;
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator mod 24;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit100Test }
- function TSInt64Bit100Test.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit division by 100';
- end;
- function TSInt64Bit100Test.GetDivisor: Int64;
- begin
- Result := 100;
- end;
- procedure TSInt64Bit100Test.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- case Index of
- 0:
- Numerator := Int64($8000000000000000);
- 1:
- Numerator := Int64($8000000000000008);
- 2:
- Numerator := Int64($8000000000000009);
- 253:
- Numerator := Int64($7FFFFFFFFFFFFFF7);
- 254:
- Numerator := Int64($7FFFFFFFFFFFFFF8);
- 255:
- Numerator := Int64($7FFFFFFFFFFFFFFF);
- else
- Numerator := Index - 128;
- end;
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator div 100;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit100ModTest }
- function TSInt64Bit100ModTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit modulus by 100';
- end;
- function TSInt64Bit100ModTest.GetDivisor: Int64;
- begin
- Result := 100;
- end;
- procedure TSInt64Bit100ModTest.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- case Index of
- 0:
- Numerator := Int64($8000000000000000);
- 1:
- Numerator := Int64($8000000000000008);
- 2:
- Numerator := Int64($8000000000000009);
- 253:
- Numerator := Int64($7FFFFFFFFFFFFFF7);
- 254:
- Numerator := Int64($7FFFFFFFFFFFFFF8);
- 255:
- Numerator := Int64($7FFFFFFFFFFFFFFF);
- else
- Numerator := Index - 128;
- end;
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator mod 100;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit153Test }
- function TSInt64Bit153Test.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit division by 153';
- end;
- function TSInt64Bit153Test.GetDivisor: Int64;
- begin
- Result := 153;
- end;
- procedure TSInt64Bit153Test.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := FS64_153Input[Index and $F];
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator div 153;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit153ModTest }
- function TSInt64Bit153ModTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit modulus by 153';
- end;
- function TSInt64Bit153ModTest.GetDivisor: Int64;
- begin
- Result := 153;
- end;
- procedure TSInt64Bit153ModTest.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := FS64_153Input[Index and $F];
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator mod 153;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit1461Test }
- function TSInt64Bit1461Test.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit division by 1,461';
- end;
- function TSInt64Bit1461Test.GetDivisor: Int64;
- begin
- Result := 1461;
- end;
- procedure TSInt64Bit1461Test.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := FS64_1461Input[Index and $F];
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator div 1461;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit1461ModTest }
- function TSInt64Bit1461ModTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit modulus by 1,461';
- end;
- function TSInt64Bit1461ModTest.GetDivisor: Int64;
- begin
- Result := 1461;
- end;
- procedure TSInt64Bit1461ModTest.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := FS64_1461Input[Index and $F];
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator mod 1461;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit10000Test }
- function TSInt64Bit10000Test.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit division by 10,000 (Currency)';
- end;
- function TSInt64Bit10000Test.GetDivisor: Int64;
- begin
- Result := 10000;
- end;
- procedure TSInt64Bit10000Test.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := FS64_10000Input[Index and $F];
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator div 10000;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit10000ModTest }
- function TSInt64Bit10000ModTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit modulus by 10,000 (Currency)';
- end;
- function TSInt64Bit10000ModTest.GetDivisor: Int64;
- begin
- Result := 10000;
- end;
- procedure TSInt64Bit10000ModTest.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := FS64_10000Input[Index and $F];
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator mod 10000;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit86400000Test }
- function TSInt64Bit86400000Test.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit division by 86,400,000';
- end;
- function TSInt64Bit86400000Test.GetDivisor: Int64;
- begin
- Result := 86400000;
- end;
- procedure TSInt64Bit86400000Test.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := FS64_86400000Input[Index and $F];
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator div 86400000;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit86400000ModTest }
- function TSInt64Bit86400000ModTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit modulus by 86,400,000';
- end;
- function TSInt64Bit86400000ModTest.GetDivisor: Int64;
- begin
- Result := 86400000;
- end;
- procedure TSInt64Bit86400000ModTest.DoTestIteration(Iteration: Integer);
- var
- Numerator, Answer: Int64;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := FS64_86400000Input[Index and $F];
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := Numerator mod 86400000;
-
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit3ModCmpTest }
- function TSInt64Bit3ModCmpTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit (n mod 3) = 0';
- end;
- function TSInt64Bit3ModCmpTest.GetDivisor: Int64;
- begin
- Result := 3;
- end;
- procedure TSInt64Bit3ModCmpTest.DoTestIteration(Iteration: Integer);
- var
- Numerator: Int64; Answer: Boolean;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- case Index of
- 0:
- Numerator := Int64($8000000000000000);
- 1:
- Numerator := Int64($8000000000000006);
- 2:
- Numerator := Int64($8000000000000007);
- 253:
- Numerator := Int64($7FFFFFFFFFFFFFF9);
- 254:
- Numerator := Int64($7FFFFFFFFFFFFFFA);
- 255:
- Numerator := Int64($7FFFFFFFFFFFFFFF);
- else
- Numerator := Index - 128;
- end;
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := (Numerator mod 3) = 0;
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit10000ModCmpTest }
- function TSInt64Bit10000ModCmpTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit (n mod 10,000) = 0 (Currency)';
- end;
- function TSInt64Bit10000ModCmpTest.GetDivisor: Int64;
- begin
- Result := 10000;
- end;
- procedure TSInt64Bit10000ModCmpTest.DoTestIteration(Iteration: Integer);
- var
- Numerator: Int64; Answer: Boolean;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := FS64_10000Input[Index and $F];
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := (Numerator mod 10000) = 0;
- FResultArray[Index] := Answer;
- end;
- { TSInt64Bit86400000ModCmpTest }
- function TSInt64Bit86400000ModCmpTest.TestTitle: shortstring;
- begin
- Result := 'Signed 64-bit (n mod 86,400,000) = 0';
- end;
- function TSInt64Bit86400000ModCmpTest.GetDivisor: Int64;
- begin
- Result := 86400000;
- end;
- procedure TSInt64Bit86400000ModCmpTest.DoTestIteration(Iteration: Integer);
- var
- Numerator: Int64; Answer: Boolean;
- Index, X: Integer;
- begin
- Index := Iteration and $FF;
- Numerator := FS64_86400000Input[Index and $F];
- FInputArray[Index] := Numerator;
- for X := 0 to INTERNAL_LOOPS - 1 do
- Answer := (Numerator mod 86400000) = 0;
- FResultArray[Index] := Answer;
- end;
|