Skip to content

Commit 34d945a

Browse files
committed
Merge branch 'feature/38-arrays-category-tests' into develop
Fixes #38
2 parents b296c23 + 5810460 commit 34d945a

File tree

3 files changed

+518
-8
lines changed

3 files changed

+518
-8
lines changed

collection/arrays.ini

+45
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
DescEx="<p>Copies the elements of string array <var>Strings</var> to string list <var>SL</var>, replacing any existing contents of <var>SL</var>.</p>"
1010
SeeAlso=StringListToArray
1111
Units=Classes
12+
TestInfo=advanced
13+
AdvancedTest.Level=unit-tests
14+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
1215
Snip=533.dat
1316
Delphi2=N
1417
Delphi3=N
@@ -32,6 +35,9 @@ FPC=Y
3235
[ByteArraysEqual]
3336
DescEx="<p>Checks if two byte arrays are equal.</p><p>The arrays are equal if they have the same number of elements and elements at the same position in the array are equal.</p>"
3437
SeeAlso=ByteArraysSameStart
38+
TestInfo=advanced
39+
AdvancedTest.Level=unit-tests
40+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
3541
Snip=365.dat
3642
Delphi2=N
3743
Delphi3=N
@@ -55,6 +61,9 @@ FPC=Y
5561
[ByteArraysSameStart]
5662
DescEx="<p>Checks if two byte arrays <var>B1</var> and <var>B2</var> are equal for the first <var>Count</var> elements.</p><p>False is returned if any array has less than <var>Count</var> elements.</p><p><var>Count</var> must be &gt;= 1.</p>"
5763
SeeAlso=ByteArraysEqual
64+
TestInfo=advanced
65+
AdvancedTest.Level=unit-tests
66+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
5867
Snip=481.dat
5968
Delphi2=N
6069
Delphi3=N
@@ -78,6 +87,9 @@ FPC=Y
7887
[IndexOfByte]
7988
DescEx="<p>Returns the index of the first occurrence of byte <var>B</var> in byte array <var>A</var>, or -1 if <var>B</var> is not in <var>A</var>.</p>"
8089
SeeAlso=LastIndexOfByte
90+
TestInfo=advanced
91+
AdvancedTest.Level=unit-tests
92+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
8193
Snip=482.dat
8294
Delphi2=N
8395
Delphi3=N
@@ -101,6 +113,9 @@ FPC=Y
101113
[LastIndexOfByte]
102114
DescEx="<p>Returns the index of the last occurrence of byte <var>B</var> in byte array <var>A</var>, or -1 if <var>B</var> is not in <var>A</var>.</p>"
103115
SeeAlso=IndexOfByte
116+
TestInfo=advanced
117+
AdvancedTest.Level=unit-tests
118+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
104119
Snip=483.dat
105120
Delphi2=N
106121
Delphi3=N
@@ -125,6 +140,9 @@ FPC=Y
125140
DescEx="<p>Creates and returns a dynamic string array containing all the strings from the given string list.</p>"
126141
SeeAlso=ArrayToStringList
127142
Units=Classes,Types
143+
TestInfo=advanced
144+
AdvancedTest.Level=unit-tests
145+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
128146
Snip=347.dat
129147
Delphi2=N
130148
Delphi3=N
@@ -149,6 +167,9 @@ FPC=Y
149167
DescEx="<p>Appends array of bytes <var>B2</var> to the end of byte array <var>B1</var>.</p>"
150168
Depends=TBytes
151169
SeeAlso=ConcatByteArrays
170+
TestInfo=advanced
171+
AdvancedTest.Level=unit-tests
172+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
152173
Snip=364.dat
153174
Delphi2=N
154175
Delphi3=N
@@ -173,6 +194,9 @@ FPC=Y
173194
DescEx="<p>Deletes a sequence of bytes from byte array <var>B</var> starting at index <var>Start</var> with length <var>Len</var>.</p><p>If either <var>Start</var> or <var>Len</var> are less than 0 they are taken as zero. If <var>Start</var> is beyond the end of the array or if <var>Len</var> is 0 then the whole array is returned unchanged. If the sequence of bytes to be chopped extends beyond the end of the array it is truncated from <var>Start</var>.</p>"
174195
Depends=TBytes,ConcatByteArrays,SliceByteArray
175196
SeeAlso=SliceByteArray
197+
TestInfo=advanced
198+
AdvancedTest.Level=unit-tests
199+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
176200
Snip=366.dat
177201
Delphi2=N
178202
Delphi3=N
@@ -198,6 +222,9 @@ DescEx="<p>Makes a copy of an array of bytes.</p>"
198222
Extra="<p>Useful for creating a <var>TBytes</var> array from a constant array or for cloning an existing byte array.</p>"
199223
Depends=TBytes
200224
SeeAlso=AppendByteArray
225+
TestInfo=advanced
226+
AdvancedTest.Level=unit-tests
227+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
201228
Snip=367.dat
202229
Delphi2=N
203230
Delphi3=N
@@ -222,6 +249,9 @@ FPC=Y
222249
DescEx="<p>Concatenates two byte arrays <var>B1</var> and <var>B2</var> and returns the resulting array.</p><p>The result is the contents of <var>B1</var> followed by the contents of <var>B2</var>.</p>"
223250
Depends=TBytes,AppendByteArray,CloneByteArray
224251
SeeAlso=AppendByteArray
252+
TestInfo=advanced
253+
AdvancedTest.Level=unit-tests
254+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
225255
Snip=368.dat
226256
Delphi2=N
227257
Delphi3=N
@@ -246,6 +276,9 @@ FPC=Y
246276
DescEx="<p>Removes the last element of byte array <var>A</var> and returns the element. The length of <var>A</var> shrinks by one.</p><p><var>A</var> must not be empty.</p>"
247277
Depends=TBytes
248278
SeeAlso=PushByteArray,ShiftByteArray,UnShiftByteArray
279+
TestInfo=advanced
280+
AdvancedTest.Level=unit-tests
281+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
249282
Snip=484.dat
250283
Delphi2=N
251284
Delphi3=N
@@ -270,6 +303,9 @@ FPC=Y
270303
DescEx="<p>Pushes byte <var>B</var> onto the end of byte array <var>A</var>. The length of <var>A</var> grows by one.</p>"
271304
Depends=TBytes
272305
SeeAlso=PopByteArray,ShiftByteArray,UnShiftByteArray
306+
TestInfo=advanced
307+
AdvancedTest.Level=unit-tests
308+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
273309
Snip=485.dat
274310
Delphi2=N
275311
Delphi3=N
@@ -294,6 +330,9 @@ FPC=Y
294330
DescEx="<p>Removes the first element of byte array <var>A</var> and returns the element. The length of <var>A</var> shrinks by one.</p><p><var>A</var> must not be empty.</p>"
295331
Depends=TBytes
296332
SeeAlso=PopByteArray,PushByteArray,UnShiftByteArray
333+
TestInfo=advanced
334+
AdvancedTest.Level=unit-tests
335+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
297336
Snip=486.dat
298337
Delphi2=N
299338
Delphi3=N
@@ -318,6 +357,9 @@ FPC=Y
318357
DescEx="<p>Slices a range of bytes from byte array <var>B</var>, starting at index <var>Start</var> with length <var>Len</var>, and returns the result.</p><p>If either <var>Start</var> or <var>Len</var> are less than 0, they are taken as 0. If <var>Start</var> is beyond the end of the array or if <var>Len</var> is 0 then an empty array is returned. If the sequence of bytes to be sliced extends beyond the end of the array it is truncated from <var>Start</var>.</p>"
319358
Depends=TBytes
320359
SeeAlso=ChopByteArray
360+
TestInfo=advanced
361+
AdvancedTest.Level=unit-tests
362+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
321363
Snip=369.dat
322364
Delphi2=N
323365
Delphi3=N
@@ -342,6 +384,9 @@ FPC=Y
342384
DescEx="<p>Inserts byte <var>B</var> at the beginning of byte array <var>A</var>. The length of <var>A</var> grows by one.</p>"
343385
Depends=TBytes
344386
SeeAlso=PopByteArray,PushByteArray,ShiftByteArray
387+
TestInfo=advanced
388+
AdvancedTest.Level=unit-tests
389+
AdvancedTest.URL="https://github.com/delphidabbler/code-snippets/tree/master/tests/Cat-Arrays"
345390
Snip=487.dat
346391
Delphi2=N
347392
Delphi3=N

0 commit comments

Comments
 (0)