From 05727bfc3a9cfd45a8e2028dfd0806f7a8f88015 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 20 Feb 2021 17:53:40 +0100 Subject: =?UTF-8?q?Reorganize=20tests=20=F0=9F=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/typ/expr/dict.typ | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/typ/expr/dict.typ (limited to 'tests/typ/expr/dict.typ') diff --git a/tests/typ/expr/dict.typ b/tests/typ/expr/dict.typ new file mode 100644 index 00000000..655a3299 --- /dev/null +++ b/tests/typ/expr/dict.typ @@ -0,0 +1,20 @@ +// Test dictionaries. + +--- +// Empty +{(:)} + +// Two pairs. +{(a1: 1, a2: 2)} + +--- +// Simple expression after already being identified as a dictionary. +// Error: 9-10 expected named pair, found expression +{(a: 1, b)} + +// Identified as dictionary due to initial colon. +// Error: 4:4-4:5 expected named pair, found expression +// Error: 3:5 expected comma +// Error: 2:12-2:16 expected identifier +// Error: 1:17-1:18 expected expression, found colon +{(:1 b:[], true::)} -- cgit v1.2.3