-
Notifications
You must be signed in to change notification settings - Fork 22
Additional edits for ClojureCLR tests #107
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
Conversation
The failing test in shuffle does not happen on my system. You'll want to take a close at the changes. I had to do some non-trivial rearrangement in the string library tests. Also, for with-out-str, I had to introduce a helper function from clojure.test-helpers. I could not figure out how to :require or :use that library. (Both ClojureJVM and ClojureCLR use it in their test suites.) |
Thanks, David! I'll leave this for @E-A-Griffin to help with, both for the copied code (can we avoid it?) and the failing test. |
Will run tonight |
deps-clr.edn
Outdated
@@ -0,0 +1,11 @@ | |||
{:deps {} | |||
|
|||
:aliases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird spacing and indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix as you wish.
a copy of a copy of a copy from somewhere someone else used the test-runner
deps-clr.edn
Outdated
{:test | ||
{:extra-paths ["test"] | ||
:extra-deps {io.github.dmiller/test-runner {:git/sha "c055ea13d19c6a9b9632aa2370fcc2215c8043c3"}} | ||
;; :main-opts {"-m" "cognitect.test-runner" "-d" "test"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we drop this dead code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.
test/clojure/core_test/byte.cljc
Outdated
0 0 | ||
127 127 | ||
1 1N | ||
0 0N | ||
-1 -1N | ||
#?@(:cljr [] :default [-1 -1N]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing is weird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had just inserted the original code in the :default case.
Format as you see fit, for sure.
test/clojure/core_test/byte.cljc
Outdated
1 1.0M | ||
0 0.0M | ||
-1 -1.0M | ||
#?@(:cljr [] :default [-1 -1.0M]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing is weird
test/clojure/core_test/byte.cljc
Outdated
1 1.1M | ||
-1 -1.1M])) | ||
#?@(:cljr [] :default [-1 -1.1M])])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing is weird for each of these
(is (thrown? Exception (byte -128.000001))) | ||
(is (thrown? Exception (byte -129))) | ||
(is (= 128 (byte 128))) | ||
(is (= 127(byte 127.000001))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing is weird
(defn platform-newlines [s] (.Replace ^String s "\n" nl))) ;;; .replace, add type hint | ||
:clj | ||
(let [nl (System/getProperty "line.separator")] | ||
(defn platform-newlines [s] (.replace s "\n" nl))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nitpick but I think it'd be cleaner to have the var defined with a defn
at the top level for all implementations and then change the body based on platform, i.e.
(defn platform-newlines [s]
#?(:clj
(let [nl (System/getProperty "line.separator")]
(.replace s "\n" nl))
:cljr
(let [nl Environment/NewLine] ;;; (System/getProperty "line.separator")]
(.Replace ^String s "\n" nl))) ;;; .replace, add type hint
:default
s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
(is (#?(:cljs true? :cljr true :default false?) (str/blank? " "))) | ||
(is (#?(:cljs true? :cljr true :default false?) (str/blank? "\u2007")))) | ||
(is (#?(:cljs true? :cljr true? :default false?) (str/blank? " "))) | ||
(is (#?(:cljs true? :cljr true? :default false?) (str/blank? "\u2007")))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing is weird here
deps-clr.edn
Outdated
;; :main-opts {"-m" "cognitect.test-runner" "-d" "test"} | ||
:exec-fn cognitect.test-runner.api/test | ||
:exec-args {:dirs ["test"] | ||
:patterns [".*test.*"]}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will work, most namespaces don't have test
in the name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are probably right, though i think all tests were running for me. I think you can just leave out the :patterns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try it again but it didn't work for me when I tried this last night
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works, thanks!
@dmiller this is what I got
|
@dmiller I can push the changes if you're able to give me write access to your fork so I can push updates to your branch (otherwise I think I'd need to fork your fork which seems excessive) |
Invitation sent.
…On Fri, Sep 5, 2025 at 11:32 PM Emma Griffin ***@***.***> wrote:
*E-A-Griffin* left a comment (jank-lang/clojure-test-suite#107)
<#107 (comment)>
@dmiller <https://github.com/dmiller> I can push the changes if you're
able to give me write access to your fork so I can push updates to your
branch (otherwise I think I'd need to fork your fork which seems excessive)
—
Reply to this email directly, view it on GitHub
<#107 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAUVZMUABP6P4EIDYU7G7L3RJIUFAVCNFSM6AAAAACFX6MH6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENRQGMYDGOJVGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still some failing CLR tests (on my end, not sure if @dmiller has any failures) but I think we can clean those up later, I'm happy to take a further look in a follow up but this is blocking multiple PRs so I think better to get it through and make incremental progress
@jeaye ^ left my approval with a note, if you want to take a look |
Thanks, Emma. We can't merge failing tests, since we need CI on main to be passing (and we need CI on this PR to be passing prior to merging). If there's anything currently failing which we plan on tackling in the future, we can disable that code with a |
That sounds like a plan.
I'm on call to help resolve issues.
At present I have only seen intermittent failure in tests in add-watch and
tap.
Given that they are intermittent, I'm wondering about some timing problems
in those tests.
But otherwise, I have only passes.
…On Sun, Sep 7, 2025 at 5:02 PM Jeaye Wilkerson ***@***.***> wrote:
*jeaye* left a comment (jank-lang/clojure-test-suite#107)
<#107 (comment)>
@jeaye <https://github.com/jeaye> ^ left my approval with a note, if you
want to take a look
Thanks, Emma. We can't merge failing tests, since we need CI on main to be
passing (and we need CI on this PR to be passing prior to merging). If
there's anything currently failing which we plan on tackling in the future,
we can disable that code with a #_ or similar, along with a comment
regarding the issue and intention to fix.
—
Reply to this email directly, view it on GitHub
<#107 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAUVZI4RNTVJQEAB7JHPR33RSMODAVCNFSM6AAAAACFX6MH6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENRUGA2DCNJTGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@dmiller if the tests are passing on your end then it's probably an issue on my local |
@jeaye okay, this time for real I think it's ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, both of you!
I might have made a little more work for the two of you than intended.
It was a fair amount of editing.
As folks continue to add to the testing suite, consider me on call to make
sure things work in ClojureCLR.
…On Tue, Sep 9, 2025 at 2:56 PM Jeaye Wilkerson ***@***.***> wrote:
Merged #107 <#107>
into main.
—
Reply to this email directly, view it on GitHub
<#107 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAUVZMQ2HC3LQZIAC5C5O33R4PFDAVCNFSM6AAAAACFX6MH6SVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJZGU4TMNRUGI3TCNQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
No description provided.