diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-04-13 10:39:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 08:39:45 +0000 |
| commit | 020294fca9a7065d4b9cf4e677f606ebaaa29b00 (patch) | |
| tree | c0027ad22046e2726c22298461327823d6b88d53 /tests/typ/bugs/3154-array-dict-mut-entry.typ | |
| parent | 72dd79210602ecc799726fc096b078afbb47f299 (diff) | |
Better test runner (#3922)
Diffstat (limited to 'tests/typ/bugs/3154-array-dict-mut-entry.typ')
| -rw-r--r-- | tests/typ/bugs/3154-array-dict-mut-entry.typ | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/tests/typ/bugs/3154-array-dict-mut-entry.typ b/tests/typ/bugs/3154-array-dict-mut-entry.typ deleted file mode 100644 index b5a52814..00000000 --- a/tests/typ/bugs/3154-array-dict-mut-entry.typ +++ /dev/null @@ -1,109 +0,0 @@ -// Issue #3154: Confusing errors from methods supposed to return a mutable entry -// https://github.com/typst/typst/issues/3154 -// Ref: false - ---- -#{ - let array = () - // Error: 3-16 array is empty - array.first() -} - ---- -#{ - let array = () - // Error: 3-16 array is empty - array.first() = 9 -} - ---- -#{ - let array = () - // Error: 3-15 array is empty - array.last() -} - ---- -#{ - let array = () - // Error: 3-15 array is empty - array.last() = 9 -} - ---- -#{ - let array = (1,) - // Error: 3-14 array index out of bounds (index: 1, len: 1) and no default value was specified - array.at(1) -} - ---- -#{ - let array = (1,) - test(array.at(1, default: 0), 0) -} - ---- -#{ - let array = (1,) - // Error: 3-14 array index out of bounds (index: 1, len: 1) - array.at(1) = 9 -} - ---- -#{ - let array = (1,) - // Error: 3-26 array index out of bounds (index: 1, len: 1) - array.at(1, default: 0) = 9 -} - ---- -#{ - let dict = (a: 1) - // Error: 3-15 dictionary does not contain key "b" and no default value was specified - dict.at("b") -} - ---- -#{ - let dict = (a: 1) - test(dict.at("b", default: 0), 0) -} - ---- -#{ - let dict = (a: 1) - // Error: 3-15 dictionary does not contain key "b" - // Hint: 3-15 use `insert` to add or update values - dict.at("b") = 9 -} - ---- -#{ - let dict = (a: 1) - // Error: 3-27 dictionary does not contain key "b" - // Hint: 3-27 use `insert` to add or update values - dict.at("b", default: 0) = 9 -} - ---- -#{ - let dict = (a: 1) - // Error: 8-9 dictionary does not contain key "b" - dict.b -} - ---- -#{ - let dict = (a: 1) - dict.b = 9 - test(dict, (a: 1, b: 9)) -} - ---- -#{ - let dict = (a: 1) - // Error: 3-9 dictionary does not contain key "b" - // Hint: 3-9 use `insert` to add or update values - dict.b += 9 -} |
