File tree 2 files changed +17
-3
lines changed 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ TTestEncoding = class(TTestCase)
24
24
procedure IdWithInvalidCharacter ;
25
25
// out-of-range test not implemented:
26
26
// compiler enforces that all numbers are within the range of a TNumber
27
+ procedure ExtremeValue ;
27
28
end ;
28
29
29
30
implementation
@@ -189,6 +190,20 @@ procedure TTestEncoding.IdWithInvalidCharacter;
189
190
end ;
190
191
end ;
191
192
193
+ procedure TTestEncoding.ExtremeValue ;
194
+ const
195
+ Number: TNumber = $FFFFFFFFFFFFFFFF;
196
+ Id = ' eIkvoXH40Lmd' ; // from a previous EncodeSingle
197
+ begin
198
+ with TSqids.Create do
199
+ try
200
+ AssertEquals(EncodeSingle(Number), Id);
201
+ AssertTrue(DecodeSingle(Id) = Number);
202
+ finally
203
+ Free;
204
+ end ;
205
+ end ;
206
+
192
207
initialization
193
208
RegisterTest(TTestEncoding);
194
209
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<CONFIG >
3
3
<ProjectOptions >
4
- <Version Value =" 11 " />
4
+ <Version Value =" 12 " />
5
5
<PathDelim Value =" \" />
6
6
<General >
7
7
<Flags >
8
8
<MainUnitHasCreateFormStatements Value =" False" />
9
9
<MainUnitHasTitleStatement Value =" False" />
10
10
<MainUnitHasScaledStatement Value =" False" />
11
+ <CompatibilityMode Value =" True" />
11
12
</Flags >
12
13
<SessionStorage Value =" InProjectDir" />
13
- <MainUnit Value =" 0" />
14
14
<Title Value =" testsqids" />
15
15
<UseAppBundle Value =" False" />
16
16
<ResourceType Value =" res" />
24
24
</PublishOptions >
25
25
<RunParams >
26
26
<FormatVersion Value =" 2" />
27
- <Modes Count =" 0" />
28
27
</RunParams >
29
28
<RequiredPackages Count =" 1" >
30
29
<Item1 >
You can’t perform that action at this time.
0 commit comments