Thread overview
Release fluent-asserts 0.6.0
Jul 02, 2017
Szabo Bogdan
Jul 03, 2017
extrawurst
Jul 03, 2017
WebFreak001
Jul 04, 2017
Szabo Bogdan
Jul 05, 2017
Soulsbane
Jul 08, 2017
Jay Norwood
Jul 08, 2017
Eric
July 02, 2017
Hi,

I just made a new release of fluent-asserts:

http://fluentasserts.szabobogdan.com/
https://code.dlang.org/packages/fluent-asserts

Since my last announcement I improved the library with:
 - better error messages
 - better exception api
 - integration with ranges
 - new asserts `executionTime` for callable and `containsOnly` for ranges
 - a new `Assert` utility for those who don't like the BDD style of writing asserts

Any feedback is appreciated.

Thanks,
Bogdan
July 03, 2017
On Sunday, 2 July 2017 at 13:34:25 UTC, Szabo Bogdan wrote:
> Hi,
>
> I just made a new release of fluent-asserts:
>
> http://fluentasserts.szabobogdan.com/
> https://code.dlang.org/packages/fluent-asserts
>
> Since my last announcement I improved the library with:
>  - better error messages
>  - better exception api
>  - integration with ranges
>  - new asserts `executionTime` for callable and `containsOnly` for ranges
>  - a new `Assert` utility for those who don't like the BDD style of writing asserts
>
> Any feedback is appreciated.
>
> Thanks,
> Bogdan

Thanks Bogdan,
I am using your lib regularly and especially appreciate the much better printing especially the actual value vs. expected.

Cheers,
Stephan
July 03, 2017
On Sunday, 2 July 2017 at 13:34:25 UTC, Szabo Bogdan wrote:
> Hi,
>
> I just made a new release of fluent-asserts:
>
> http://fluentasserts.szabobogdan.com/
> https://code.dlang.org/packages/fluent-asserts
>
> Since my last announcement I improved the library with:
>  - better error messages
>  - better exception api
>  - integration with ranges
>  - new asserts `executionTime` for callable and `containsOnly` for ranges
>  - a new `Assert` utility for those who don't like the BDD style of writing asserts
>
> Any feedback is appreciated.
>
> Thanks,
> Bogdan

Cool!

I just tried it and it is really magic how good unittests can be, I love it showing the source code where it went wrong, I guess that might be a security risk but if anyone uses asserts in a production environment and it's leaking passwords it's their fault anyway. I am not really a fan of the a.should.be(b) thing but I like the Assert.equals() function, just looks more natural and easier to read to me + it is understandable by people who can't speak english better.
July 04, 2017
Thanks for the appreciation!


On Monday, 3 July 2017 at 15:07:48 UTC, WebFreak001 wrote:
> Cool!
>
> I just tried it and it is really magic how good unittests can be, I love it showing the source code where it went wrong, I

Yes, a lot of programming languages have such assert libraries... and they are so helpful

> guess that might be a security risk but if anyone uses asserts in a production environment and it's leaking passwords it's their fault anyway.

If you are referring to the the fact that the source code is displayed, it should be ok, since if the files are not found near the test build, the code will not be displayed. Anyway... it might be a good idea to allow the library on the release build only if you provide a certain flag. Failing the release build if the library is included it might be useful since there is no reason to link it with the production code.

> I am not really a fan of the a.should.be(b) thing but I like the Assert.equals() function, just looks more natural and easier to read to me + it is understandable by people who can't speak english better.

I thought that not anyone likes the BDD approach so I added `Assert`... I think it's good to have options
July 05, 2017
On Sunday, 2 July 2017 at 13:34:25 UTC, Szabo Bogdan wrote:
> Hi,
>
> I just made a new release of fluent-asserts:
>
> http://fluentasserts.szabobogdan.com/
> https://code.dlang.org/packages/fluent-asserts
>
> Since my last announcement I improved the library with:
>  - better error messages
>  - better exception api
>  - integration with ranges
>  - new asserts `executionTime` for callable and `containsOnly` for ranges
>  - a new `Assert` utility for those who don't like the BDD style of writing asserts
>
> Any feedback is appreciated.
>
> Thanks,
> Bogdan

Great job with this! I absolutely love it. It's made my tests less ugly that's for sure. Why this kind of library isn't already a part of D is beyond me.
July 08, 2017
On Sunday, 2 July 2017 at 13:34:25 UTC, Szabo Bogdan wrote:

> Any feedback is appreciated.
>
> Thanks,
> Bogdan

Hi,  if you're just looking for other ideas, you might want to look at adding capabilities like in the java hamcrest matchers.  You might also want to support regular expression matches in the string matchers.

http://hamcrest.org/JavaHamcrest/javadoc/1.3/org/hamcrest/Matchers.html

These were used in swtbot, which made a very nice testing environment for their swt gui widgets.  Swtbot added filtering for the context of the match as well.  You can get a feel for it in this article.  There is a DWT library translated from java swt, but this testing app wasn't ported.

http://www.vogella.com/tutorials/SWTBot/article.html






July 08, 2017
On Sunday, 2 July 2017 at 13:34:25 UTC, Szabo Bogdan wrote:
> Hi,
>
> I just made a new release of fluent-asserts:
>
> http://fluentasserts.szabobogdan.com/
> https://code.dlang.org/packages/fluent-asserts
>
> Since my last announcement I improved the library with:
>  - better error messages
>  - better exception api
>  - integration with ranges
>  - new asserts `executionTime` for callable and `containsOnly`

This is great. It makes writing unit tests much less tedious.

-Eric