mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 01:13:30 +00:00
Branches: main, 11.07
Fix a bug reported by Tomas By on mercury-bugs: the behaviour of
multi_map.det_update/4 did not match the documentation.
library/multi_map.m:
Fix the behaviour of det_update/4.
Add replace/4, a semidet version of det_replace/4.
Reformat some documentation.
NEWS:
Announce the above fix and addition.
tests/hard_coded/multi_map_test.{m,exp}:
Replace the existing test for multi_maps with something a bit
stronger: in particular check the semantics of update, replace,
insert and set.
15 lines
542 B
Plaintext
15 lines
542 B
Plaintext
[13, 11]
|
|
PASSED: is_empty(EmptyMap) succeeded
|
|
PASSED: is_empty(Map) failed
|
|
det_insert/4: [1 - [13, 11], 2 - [22], 3 - [34]]
|
|
insert/4 (test 1): PASSED: [1 - [13, 11], 2 - [22], 3 - [34]]
|
|
insert/4 (test 2) PASSED
|
|
det_update/4: [1 - [14, 13, 11], 2 - [22]]
|
|
update/4 (test 1): PASSED: [1 - [14, 13, 11], 2 - [22]]
|
|
update/4 (test 2): PASSED
|
|
det_replace/4: [1 - [561, 562, 563], 2 - [22]]
|
|
replace/4 (test 1): PASSED: [1 - [561, 562, 563], 2 - [22]]
|
|
replace/4 (test 2): PASSED
|
|
set/4 (test 1): [1 - [12]]
|
|
set/4 (test 2): [1 - [14, 13, 11], 2 - [22]]
|