From 12be8fe070d6c3b0ef04c744ba300063f30791cf Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 11 Apr 2023 21:54:47 +0200 Subject: Let dictionaries respect insertion order --- tests/typ/compiler/dict.typ | 4 ++-- tests/typ/compiler/for.typ | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/typ/compiler') 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. -- cgit v1.2.3