diff options
author | Fabian Meumertzheim <meumertzheim@code-intelligence.com> | 2023-04-06 11:59:46 +0200 |
---|---|---|
committer | Fabian Meumertzheim <fabian@meumertzhe.im> | 2023-04-06 13:48:56 +0200 |
commit | 7fc394de663f1af94d5bb84a3fee7cc15f22f93b (patch) | |
tree | d0a4c09c94bf28f6e7a585c8dfba4600b9b47260 /src/test | |
parent | e880175e42b8a3f14395a6018ebbd6e48facc814 (diff) | |
download | jazzer-api-7fc394de663f1af94d5bb84a3fee7cc15f22f93b.tar.gz |
mutator: Represent `Map` as `LinkedHashMap`
This ensures that the iteration order and thus the mutations applied to
the map are deterministic.
Some tests had to be adjusted - they were potentially flaky as they
dependend on the previously unspecified iteration order.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java index 10cd8e97..a5b4e4d8 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java @@ -83,7 +83,7 @@ class MapMutatorTest { // Mutate entry false, // Index - 0, + 1, // Mutate value false)) { map = mutator.mutate(map, prng); @@ -154,7 +154,7 @@ class MapMutatorTest { map = mutator.mutate(map, prng); } assertThat(map).hasSize(2); - assertThat(map).containsKey("Key2"); + assertThat(map).containsKey("Key1"); assertThat(map).containsKey("New"); } } |