digitalmars.D - New fluent asserts library for D
- Nick Papanastasiou (13/13) Mar 14 2019 Hey guys!
- Jonathan Marler (5/18) Mar 15 2019 Why not make AssertBuilder a struct instead of a class? Doing so
- Seb (4/6) Mar 15 2019 Did you have a look at fluent-asserts?
- Andre Pany (9/15) Mar 15 2019 I do not know the reason why it was not found, but searching for
- FeepingCreature (3/9) Mar 20 2019 Also dshould? https://code.dlang.org/packages/dshould
Hey guys! My new job has some room for me to use D at work, so before I do anything serious there I've been trying to work through some personal projects. The vast majority of my day job is Java, and I've really been enjoying the AssertJ library (http://joel-costigliola.github.io/assertj/) in my unit tests, and thought it was a shame that I couldn't find something similar for D. Here's what I've come up with so far: https://github.com/NickPapanastasiou/describe Obviously still in very early stages. At the moment, docs are lacking and failure messages need to be made clear, but it's fairly usable. Any and all feedback is welcome and appreciated!
Mar 14 2019
On Friday, 15 March 2019 at 03:04:39 UTC, Nick Papanastasiou wrote:Hey guys! My new job has some room for me to use D at work, so before I do anything serious there I've been trying to work through some personal projects. The vast majority of my day job is Java, and I've really been enjoying the AssertJ library (http://joel-costigliola.github.io/assertj/) in my unit tests, and thought it was a shame that I couldn't find something similar for D. Here's what I've come up with so far: https://github.com/NickPapanastasiou/describe Obviously still in very early stages. At the moment, docs are lacking and failure messages need to be made clear, but it's fairly usable. Any and all feedback is welcome and appreciated!Why not make AssertBuilder a struct instead of a class? Doing so allows it to be used with nogc/betterC, and you're not making more garbage for the GC to clean up later.
Mar 15 2019
On Friday, 15 March 2019 at 03:04:39 UTC, Nick Papanastasiou wrote:and thought it was a shame that I couldn't find something similar for D.Did you have a look at fluent-asserts? https://code.dlang.org/packages/fluent-asserts
Mar 15 2019
On Friday, 15 March 2019 at 10:35:59 UTC, Seb wrote:On Friday, 15 March 2019 at 03:04:39 UTC, Nick Papanastasiou wrote:I do not know the reason why it was not found, but searching for "assert" on code.dlang.org is not easy. Packages with "assert" in name have no priority. It is very easy to come to the conclusion there is no such package. Fluent-asserts is hidden somewhere on a long list with completely unrelated packages (mir, mysql, pegged, ...) Kind regards Andreand thought it was a shame that I couldn't find something similar for D.Did you have a look at fluent-asserts? https://code.dlang.org/packages/fluent-asserts
Mar 15 2019
On Friday, 15 March 2019 at 10:35:59 UTC, Seb wrote:On Friday, 15 March 2019 at 03:04:39 UTC, Nick Papanastasiou wrote:Also dshould? https://code.dlang.org/packages/dshould (Meant to run with unit-threaded.)and thought it was a shame that I couldn't find something similar for D.Did you have a look at fluent-asserts? https://code.dlang.org/packages/fluent-asserts
Mar 20 2019