Commit Graph

18 Commits

Author SHA1 Message Date
68be55342d fix failing test for 'PersistentVector.extendExistingMatch'. The test itself was wrong, as it forgets that lists are 0-indexed. 2026-02-07 01:40:43 +00:00
7fa573334f add failing test for PersistentVector.extendExistingMatch. (Need to fix.) 2026-02-07 00:33:29 +00:00
0ea0d44da3 add function to extend an existing match, and add tests for it 2026-02-07 00:29:58 +00:00
c856f49a6c amend merge function from persistent-vector.sml. If we reach the same depth and find that there is no space, then climb (using the stack) up by one depth, raise the depth of the smaller node by 1, and merge there. This helps ensure balance. Before, we broke a LEAF into two LEAF objects if we wanted to merge and found that there was no room, but that led to balancing problems, which are addressed by this change. 2026-02-05 23:54:31 +00:00
29d84a9f9f done adding tests for 'PersistentVector.delete' function 2026-01-18 08:08:45 +00:00
66d672505a fix calculation of number to decrement by in 'PersistentVector.delete', after additional test showed that calculation resulted in incorrect metadata. (Todo: just implement function to merge left and right subtrees.) 2026-01-18 00:27:03 +00:00
83bb852ae2 add another test for 'PersistentVector.delete 2026-01-17 23:45:20 +00:00
1c947eab7d add a test for 'PersistentVector.delete' (even though the 'PersistentVector.merge' helper function is unimplemented) 2026-01-17 23:27:36 +00:00
08abb43e3b added tests for 'PersistentVector.splitLeft' function 2026-01-16 21:30:56 +00:00
47cf451501 begin adding tests for 'PersistentVector.splitLeft' function 2026-01-16 21:16:23 +00:00
e0bebb6d1a add tests checking that PersistentVector.toList works as expected 2026-01-15 13:20:45 +00:00
290cc65a52 add tests checking that persistent-vector.sml appends properly, as it is meant to 2026-01-15 13:03:23 +00:00
ac3b987c42 add boilerplate helper functions in persistent-vector-tests.sml to check if list contains indices that are in range, or are not in range 2026-01-15 12:49:02 +00:00
ef43efb680 rename some test files 2026-01-15 12:32:13 +00:00
1330bcdff9 add a couple of more tests, and revert persistent-vector.sml to how it was before adding rope-like metadata 2025-12-12 10:30:21 +00:00
2f2d530dae fix calculation for delete function (we needed to fix the calculation of how much to decrement by) 2025-12-09 13:10:23 +00:00
102f2788a1 add basic tests for PersistentVector.delete 2025-12-09 12:27:23 +00:00
e6bda83309 begin adding tests for persistent-vector.sml, and add bug fix to 'PersistentVector.delete' in light of one of the tests. (We were decrementing by the wrong value previously, but I fixed it and added a comment of how we arrive at the value we want to decrement by 2025-12-09 11:42:30 +00:00