diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-04-11 21:54:47 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-04-11 21:59:02 +0200 |
| commit | 12be8fe070d6c3b0ef04c744ba300063f30791cf (patch) | |
| tree | 8f018b638ebbc78130cc34ae684dc06367bd865f /tests/typ/compiler | |
| parent | 6dcb65e3a30c59f4a99cd1a985075b1d0adc385f (diff) | |
Let dictionaries respect insertion order
Diffstat (limited to 'tests/typ/compiler')
| -rw-r--r-- | tests/typ/compiler/dict.typ | 4 | ||||
| -rw-r--r-- | tests/typ/compiler/for.typ | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/typ/compiler/dict.typ b/tests/typ/compiler/dict.typ index c8dd086f..fb0a59a3 100644 --- a/tests/typ/compiler/dict.typ +++ b/tests/typ/compiler/dict.typ @@ -48,8 +48,8 @@ #let dict = (a: 3, c: 2, b: 1) #test("c" in dict, true) #test(dict.len(), 3) -#test(dict.values(), (3, 1, 2)) -#test(dict.pairs().map(p => p.first() + str(p.last())).join(), "a3b1c2") +#test(dict.values(), (3, 2, 1)) +#test(dict.pairs().map(p => p.first() + str(p.last())).join(), "a3c2b1") #dict.remove("c") #test("c" in dict, false) diff --git a/tests/typ/compiler/for.typ b/tests/typ/compiler/for.typ index 4a3aefb4..f525215f 100644 --- a/tests/typ/compiler/for.typ +++ b/tests/typ/compiler/for.typ @@ -7,7 +7,7 @@ // Empty array. #for x in () [Nope] -// Dictionary is not traversed in insertion order. +// Dictionary is traversed in insertion order. // Should output `Age: 2. Name: Typst.`. #for (k, v) in (Name: "Typst", Age: 2) [ #k: #v. |
