clr

2025-01-18T16:40:28.492119Z

πŸŽ‰ 3
2025-01-19T18:26:13.227549Z

Looks cool. It would be nice if it had some realistic example. I don't really understand what the describe Truth thing does.

dmiller 2025-01-19T19:40:47.376129Z

I appreciate the effort to get this working under ClojureCLR.

πŸ™ 1
2025-01-19T22:45:56.341759Z

@didibus the example only shows how a couple of the assertions can be used, should and should-not. The output in the example would look something like this:

Truth
- is true
- is not false

Finished in 0.00131 seconds
2 examples, 0 failures
We could negate the assertions:
; sample.core-spec
(it "is true"
  (should false))

(it "is not false"
  (should-not true))

; out
Truth
- is true (FAILED)
- is not false (FAILED)

Failures:

  1) Truth is true
     Expected truthy but was: false
     sample/core_spec

  2) Truth is not false
     Expected falsy but was: true
     sample/core_spec

Finished in 0.00088 seconds
2 examples, 2 failures
There are tons of other assertions like should= and should-throw, which would work like this:
; sample.core-spec
(it "divides some numbers"
  (should= 5 (/ 15 3))
  (should-throw (/ 1 0)))

; out
Truth
- divides some numbers

Finished in 0.00094 seconds
1 examples, 0 failures

2025-01-19T23:10:58.987329Z

I think I mean, showing a test that appears to test true doesn't let me imagine how I'd benefit from this style of testing to test my actual application features.

2025-01-19T23:24:12.094179Z

It's mostly cause I'm not familiar with RSpec I think. But I feel showing an example of like, how would you test a fib function? Or do you expect like one spec per namespace, or one spec per function?

2025-01-20T18:10:20.228159Z

Ah, I see. Well as far as organizing specs go, they must be in a /spec directory and the namespace must end with _spec. Other than that, it’s really up to you how you want to organize your project πŸ™‚

2025-01-20T18:12:10.670519Z

Speclj is self-referencing; the tests for speclj are written using speclj, so you can certainly use that as an example. All of https://github.com/cleancoders/c3kit is also tested using speclj, so you can use those as examples as well.

2025-01-20T18:15:29.919589Z

Typically, we do one spec per namespace. So acme.foo would have a corresponding acme.foo-spec namespace. Helper namespaces, however, will sometimes just be tested implicitly by tests against acme.foo. So acme.helper may not necessarily have a corresponding acme.helper-spec namespace.

Saket 2025-01-18T19:09:08.350919Z

When AOT to dlls?

dmiller 2025-02-20T18:38:10.774779Z

If you are interested in the problems of getting AOT to work in ClojureCLR on .NET 9, I did a little writeup https://dmiller.github.io/clojure-clr-next/general/2025/02/20/AOT-compilation-issues.html If you have thoughts, I created a discussion https://github.com/dmiller/clojure-clr-next/discussions/8 .

πŸ‘€ 1
dmiller 2025-01-19T19:41:08.047739Z

Next on the list after getting 1.12 beta out.

πŸ‘ 2
πŸ™Œ 1