Skip to content

Add tests for clojure.core/list#915

Open
brandoncorrea wants to merge 1 commit into
jank-lang:mainfrom
brandoncorrea:core/list
Open

Add tests for clojure.core/list#915
brandoncorrea wants to merge 1 commit into
jank-lang:mainfrom
brandoncorrea:core/list

Conversation

@brandoncorrea

Copy link
Copy Markdown
Contributor

This PR closes #336.

These tests were heavily inspired by its vector counterpart: https://github.com/jank-lang/clojure-test-suite/blob/main/test/clojure/core_test/vector.cljc.

Differences from vector Tests

  • Preference for are over repeated is
  • Dedicated satisfies list? section over a list? checks in various tests
  • One extra (list '()) test
  • Removal of into operation from large lists
    • (= (range 100) coll) (should) works with either vectors or lists
    • Test is no longer dependent on into working properly (or at all)

Aligning vector and list tests

I think it would be valuable to align the structure of these two tests. I can make those changes in this PR, or create a follow-up PR that aligns the two.

@jeaye jeaye left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me! Pending @dgr's feedback.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new clojure.core/list test namespace to close issue #336, expanding the core collection constructor coverage alongside existing vector tests.

Changes:

  • Introduces clojure.core-test.list with when-var-exists-guarded tests for list
  • Covers empty, single/multiple element construction, nested structures, duplicates, larger arities, and mixed-type lists
  • Uses are to reduce repetition and keep assertions compact

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

clojure.core/list

3 participants