Keeps every written set element when keeping quotes
All 6 scenarios hold
These rules cover one cell value: strings, quoting, the three collection forms, and the errors a malformed value raises. The three collection forms are a list, a set, and a map.
Keeping quotes is the mode for a formatter, which must keep the author's text. In that mode a set comes back as a WrittenSet: each element as written, in order, with a repeated element kept. Without kept quotes a set holds each value once, whatever its quoting.
expected outcome
broken scenario
| Scenario | Input | Discarding quotes? | Keeping quotes? |
|---|---|---|---|
| Set with unquoted string | {a} |
|
|
| Set with double quoted string | {"a"} |
|
|
| Set with single quoted string | {'a'} |
|
|
| Repeated element | {a, a, b} |
|
|
| Repeated element in another quoting | {a, 'a'} |
|
|
| Empty set | {} | {} | [] |