Commit Graph

21 Commits

Author SHA1 Message Date
gingerBill
a300a860ec Add #+feature dynamic-literals to tests 2025-01-05 13:46:58 +00:00
Nia
3337d6b264 Add linear_search_reverse and linear_search_reverse_proc 2024-09-25 16:41:55 +03:00
Feoramund
806c87d71d Check for zero-length slices in slice.equal 2024-09-03 02:48:26 -04:00
Jeroen van Rijn
7064166da2 Merge pull request #3767 from Feoramund/use-rng-context-in-test-runner
Setup `context.random_generator` in test runner
2024-06-19 09:51:13 +02:00
Jeroen van Rijn
0268be1925 Add tests for slice.unique and slice.unique_proc 2024-06-16 13:41:25 +02:00
Feoramund
8b31cddaba Keep -vet happy 2024-06-15 15:49:05 -04:00
Feoramund
1a52cf1f1c Use test's random generator
This removes the `create` calls when a test was only setting up a
generator, and it replaces them with `reset` when run in a loop.
2024-06-15 15:49:05 -04:00
gingerBill
4c7469a264 Merge pull request #3764 from Feoramund/test-runner-fixes
Fix half-implemented features in the test runner
2024-06-15 16:19:58 +01:00
Feoramund
f353adc7fb Prefer log.error over fail_now in this case 2024-06-15 10:53:21 -04:00
gingerBill
7ec17ecf98 Update core:math/rand to use context.random_generator and remove rand.Rand 2024-06-15 15:33:24 +01:00
Feoramund
047b505836 Add test for slice.permute 2024-06-09 16:15:43 -04:00
Jeroen van Rijn
9ba02e888d Port tests\core\slice 2024-06-02 14:47:09 -04:00
Hector
82088e4a75 Used strings.builder_reset instead of clear for the string builder 2023-11-25 16:26:29 +00:00
Hector
b12bfe407d Updated to tabs and used provided test methods. 2023-11-25 16:21:48 +00:00
Hector
1db5e1250f Binary search improvements
Modified the algorithm so that the index is either the location of the
element if found or the index at which to insert the element to maintain
sorted order.

Also added some tests to verify the above claim.
2023-11-25 13:48:48 +00:00
Phil
1296630160 cleanup tests 2022-09-01 12:34:08 -07:00
Phil
63eec25044 add sort_by_indices overload and test 2022-09-01 12:32:33 -07:00
Phil
7a9b0731cf add tests for sort_by_indices 2022-09-01 12:13:15 -07:00
Phil
d45661c405 cleanup slice sorting with indices changes 2022-09-01 11:51:45 -07:00
Phil
002bec256a have sort_with_indices allocate. Add a couple convenience procs for using the indices result to sort other slices. 2022-09-01 11:46:59 -07:00
Jeroen van Rijn
36473b2774 Add test for core:slice. 2022-09-01 18:04:48 +02:00