digitalmars.D.announce - fluent-asserts released
- Szabo Bogdan (8/8) Apr 09 2017 Hi!
- Jacob Carlborg (5/12) Apr 10 2017 This looks awesome. Why haven't I seen that before. Can it be used with
- Szabo Bogdan (3/19) Apr 10 2017 I did not tested it with unit-threaded, but when an assert fails
- Atila Neves (7/28) Apr 10 2017 It'll work, but it won't end up reporting it the same way. If
- Jacob Carlborg (5/10) Apr 11 2017 Ok, I see, thanks. On the other hand I just remembered that
- jmh530 (5/13) Apr 10 2017 I got really confused looking at the examples until I realized
- Szabo Bogdan (3/21) Apr 10 2017 thanks! I added 2 issues for your sugestion. I also found some
- qznc (7/15) Apr 11 2017 I was looking for testing exceptions. It is not documented, but
- Szabo Bogdan (6/26) Apr 11 2017 what do you mean, they are not documented? there is a md file
- =?UTF-8?Q?Ali_=c3=87ehreli?= (24/32) Apr 11 2017 The expression comes first in the other use cases. The following is not
- Szabo Bogdan (9/46) Apr 18 2017 Hi!
Hi! I just made an update to my fluent assert library. This is a library that allows you to write asserts in a BDD style. Right now, it contains only asserts that I needed in my projects and I promise that I will add more in the future. I would really appreciate any feedback that you can give me. https://code.dlang.org/packages/fluent-asserts Thanks!
Apr 09 2017
On 2017-04-09 15:30, Szabo Bogdan wrote:Hi! I just made an update to my fluent assert library. This is a library that allows you to write asserts in a BDD style. Right now, it contains only asserts that I needed in my projects and I promise that I will add more in the future. I would really appreciate any feedback that you can give me. https://code.dlang.org/packages/fluent-assertsThis looks awesome. Why haven't I seen that before. Can it be used with unit-threaded? -- /Jacob Carlborg
Apr 10 2017
On Monday, 10 April 2017 at 12:54:43 UTC, Jacob Carlborg wrote:On 2017-04-09 15:30, Szabo Bogdan wrote:I did not tested it with unit-threaded, but when an assert fails it throws an exception so it should work with any test runnerHi! I just made an update to my fluent assert library. This is a library that allows you to write asserts in a BDD style. Right now, it contains only asserts that I needed in my projects and I promise that I will add more in the future. I would really appreciate any feedback that you can give me. https://code.dlang.org/packages/fluent-assertsThis looks awesome. Why haven't I seen that before. Can it be used with unit-threaded?
Apr 10 2017
On Monday, 10 April 2017 at 14:15:45 UTC, Szabo Bogdan wrote:On Monday, 10 April 2017 at 12:54:43 UTC, Jacob Carlborg wrote:It'll work, but it won't end up reporting it the same way. If you'd like that to work seamlessly it's a question of having `version(Have_unit_threaded)` (or however it is it's spelled) that imports and throws `unit_threaded.should.UnitTestException`. Then Bob's your uncle. AtilaOn 2017-04-09 15:30, Szabo Bogdan wrote:I did not tested it with unit-threaded, but when an assert fails it throws an exception so it should work with any test runnerHi! I just made an update to my fluent assert library. This is a library that allows you to write asserts in a BDD style. Right now, it contains only asserts that I needed in my projects and I promise that I will add more in the future. I would really appreciate any feedback that you can give me. https://code.dlang.org/packages/fluent-assertsThis looks awesome. Why haven't I seen that before. Can it be used with unit-threaded?
Apr 10 2017
On 2017-04-10 22:41, Atila Neves wrote:It'll work, but it won't end up reporting it the same way. If you'd like that to work seamlessly it's a question of having `version(Have_unit_threaded)` (or however it is it's spelled) that imports and throws `unit_threaded.should.UnitTestException`. Then Bob's your uncle.Ok, I see, thanks. On the other hand I just remembered that unit-threaded already have a very similar API for the assertions. -- /Jacob Carlborg
Apr 11 2017
On Sunday, 9 April 2017 at 13:30:54 UTC, Szabo Bogdan wrote:Hi! I just made an update to my fluent assert library. This is a library that allows you to write asserts in a BDD style. Right now, it contains only asserts that I needed in my projects and I promise that I will add more in the future. I would really appreciate any feedback that you can give me. https://code.dlang.org/packages/fluent-asserts Thanks!I got really confused looking at the examples until I realized that should returns a struct. You might add an approxEqual for ShouldNumeric. If you have floating point numbers, it's usually more helpful than equal is.
Apr 10 2017
On Monday, 10 April 2017 at 17:38:14 UTC, jmh530 wrote:On Sunday, 9 April 2017 at 13:30:54 UTC, Szabo Bogdan wrote:thanks! I added 2 issues for your sugestion. I also found some bugs that I will fix in the next release.Hi! I just made an update to my fluent assert library. This is a library that allows you to write asserts in a BDD style. Right now, it contains only asserts that I needed in my projects and I promise that I will add more in the future. I would really appreciate any feedback that you can give me. https://code.dlang.org/packages/fluent-asserts Thanks!I got really confused looking at the examples until I realized that should returns a struct. You might add an approxEqual for ShouldNumeric. If you have floating point numbers, it's usually more helpful than equal is.
Apr 10 2017
On Sunday, 9 April 2017 at 13:30:54 UTC, Szabo Bogdan wrote:Hi! I just made an update to my fluent assert library. This is a library that allows you to write asserts in a BDD style. Right now, it contains only asserts that I needed in my projects and I promise that I will add more in the future. I would really appreciate any feedback that you can give me. https://code.dlang.org/packages/fluent-asserts Thanks!I was looking for testing exceptions. It is not documented, but the seems to be there. Still, it looks weird, because it does not fit the style: should.not.throwAnyException({ throw new Exception("test"); });
Apr 11 2017
On Tuesday, 11 April 2017 at 10:40:53 UTC, qznc wrote:On Sunday, 9 April 2017 at 13:30:54 UTC, Szabo Bogdan wrote:what do you mean, they are not documented? there is a md file fith some examples here: https://github.com/gedaiu/fluent-asserts/blob/v0.3.0/api/exceptions.md What do you think I can do to have the exception asserts to fit the style?Hi! I just made an update to my fluent assert library. This is a library that allows you to write asserts in a BDD style. Right now, it contains only asserts that I needed in my projects and I promise that I will add more in the future. I would really appreciate any feedback that you can give me. https://code.dlang.org/packages/fluent-asserts Thanks!I was looking for testing exceptions. It is not documented, but the seems to be there. Still, it looks weird, because it does not fit the style: should.not.throwAnyException({ throw new Exception("test"); });
Apr 11 2017
On 04/11/2017 11:01 PM, Szabo Bogdan wrote:The expression comes first in the other use cases. The following is not very pretty but seems to work with my proof of concept below: ({ throw new Exception("test"); }()).should.not.throwAnyException(); I checked the syntax with the following code: struct Should { Should not() { return this; } Should throwAnyException() { return this; } } Should should(E)(lazy E expr) { return Should(); } void main() { ({ throw new Exception("test"); }()).should.not.throwAnyException(); } Alishould.not.throwAnyException({ throw new Exception("test"); });what do you mean, they are not documented? there is a md file fith some examples here: https://github.com/gedaiu/fluent-asserts/blob/v0.3.0/api/exceptions.md What do you think I can do to have the exception asserts to fit the style?
Apr 11 2017
On Wednesday, 12 April 2017 at 06:22:26 UTC, Ali Çehreli wrote:On 04/11/2017 11:01 PM, Szabo Bogdan wrote:Hi! I managed to make another update to the library. http://fluentasserts.szabobogdan.com/ Based on your feedback I updated the exception asserts and I added some new ones like `Between` and `Approximately`. Also now it works with unit-threaded. Thanks for the feedback!The expression comes first in the other use cases. The following is not very pretty but seems to work with my proof of concept below: ({ throw new Exception("test"); }()).should.not.throwAnyException(); I checked the syntax with the following code: struct Should { Should not() { return this; } Should throwAnyException() { return this; } } Should should(E)(lazy E expr) { return Should(); } void main() { ({ throw new Exception("test"); }()).should.not.throwAnyException(); } Alishould.not.throwAnyException({ throw new Exception("test"); });what do you mean, they are not documented? there is a md file fith some examples here: https://github.com/gedaiu/fluent-asserts/blob/v0.3.0/api/exceptions.md What do you think I can do to have the exception asserts to fit the style?
Apr 18 2017