Skip to content

Add tests for vector? and list? #78

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

Merged
merged 4 commits into from
Mar 1, 2025
Merged

Conversation

dgr
Copy link
Contributor

@dgr dgr commented Feb 20, 2025

Add tests for:

  • vector?
  • list?

dgr added 3 commits February 19, 2025 22:47
(when-var-exists clojure.core/vector?
(deftest test-vector?
(are [expected x] (= expected (vector? x))
true [1 2 3]
Copy link
Member

@jeaye jeaye Feb 20, 2025

Choose a reason for hiding this comment

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

I think it'd be good to have a test for map entry here, since it acts like a vector. We can do this by just doing something like (first {:a :b}). In jank, since we don't have map entries, you'll actually just get a vector.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good catch. I'll add that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, this is done. Sorry for the delay.

Copy link
Member

@jeaye jeaye left a comment

Choose a reason for hiding this comment

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

Thanks, Dave!

@jeaye jeaye merged commit 10d05be into jank-lang:main Mar 1, 2025
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.

None yet

2 participants