mirror of
https://github.com/enso-org/enso.git
synced 2024-11-22 22:10:15 +03:00
Set.to_text
should not assume contents are Text
(#9548)
`Set.to_text` fails if the contents are anything other than `Text`.
This commit is contained in:
parent
e262801daa
commit
b74fb5c5c9
@ -133,7 +133,7 @@ type Set
|
||||
|
||||
## PRIVATE
|
||||
to_text : Text
|
||||
to_text self = self.to_vector.join ", " "Set{" "}"
|
||||
to_text self = self.to_vector.map .pretty . join ", " "Set{" "}"
|
||||
|
||||
## PRIVATE
|
||||
type Set_Comparator
|
||||
|
@ -62,6 +62,12 @@ add_specs suite_builder =
|
||||
(s1 == s1) . should_be_true
|
||||
(s1 == s3) . should_be_false
|
||||
|
||||
group_builder.specify "should be able to convert to text" <|
|
||||
s1 = Set.from_vector ["1", "2", "3"]
|
||||
s2 = Set.from_vector [1, 2, 3]
|
||||
s1.to_text.should_equal "Set{'1', '2', '3'}"
|
||||
s2.to_text.should_equal "Set{1, 2, 3}"
|
||||
|
||||
main filter=Nothing =
|
||||
suite = Test.build suite_builder->
|
||||
add_specs suite_builder
|
||||
|
Loading…
Reference in New Issue
Block a user