Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set.to_text should not assume contents are Text #9548

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

GregoryTravis
Copy link
Contributor

@GregoryTravis GregoryTravis commented Mar 26, 2024

Pull Request Description

Set.to_text fails if the contents are anything other than Text.

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@GregoryTravis GregoryTravis added the CI: No changelog needed Do not require a changelog entry for this PR. label Mar 26, 2024
@GregoryTravis GregoryTravis marked this pull request as ready for review March 26, 2024 16:18
Comment on lines 65 to 69
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}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we maybe use .pretty to be able to distinguish a set of text values from numbers?

i.e. that would give us

Suggested change
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}"
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}"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@GregoryTravis GregoryTravis added the CI: Ready to merge This PR is eligible for automatic merge label Mar 27, 2024
@mergify mergify bot merged commit b74fb5c into develop Mar 27, 2024
42 checks passed
@mergify mergify bot deleted the wip/set-to-text-assumes-text branch March 27, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants