Skip to content

Add unit tests for SetLiteral node#1129

Merged
amyjko merged 1 commit into
wordplaydev:mainfrom
BonnieZ-data:add-setliteral-only
May 16, 2026
Merged

Add unit tests for SetLiteral node#1129
amyjko merged 1 commit into
wordplaydev:mainfrom
BonnieZ-data:add-setliteral-only

Conversation

@BonnieZ-data
Copy link
Copy Markdown
Contributor

Context

SetLiteral is a core node in the Wordplay language with no unit test coverage. This PR adds tests to verify that set literals evaluate correctly.

Tests Added

  • Set literal with one element
  • Set literal with multiple elements
  • Set literal with string elements
  • Set literal removes duplicate elements
  • Set size via .size()
  • Set is not equal to empty set
  • Set is not empty
  • Set union combines two sets
  • Set intersection finds common elements
  • Set difference removes elements

Why

SetLiteral had zero unit tests despite being a fundamental data structure in Wordplay. These tests ensure correct behavior and protect against regressions.

Related issues

Copy link
Copy Markdown
Collaborator

@amyjko amyjko left a comment

Choose a reason for hiding this comment

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

Thanks for the unit tests!

@amyjko amyjko merged commit 7a57a46 into wordplaydev:main May 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit tests for SetLiteral node

2 participants