Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
May 15, 2020 Pijamas, a simple fluent assertation library (forked from Pyjamas) | ||||
---|---|---|---|---|
| ||||
On my run to raise stuff from dead packages, I come with Pijamas. A fork from Yamadacpc’s Pyjamas that works with D frontend 2.090 and forwards. https://zardoz89.github.io/pijamas/ v0.2.2-beta Versions v0.2.x must keep being source compatible with Pyjamas. * Update to DLang frontend 2.090 * Autogeneration of GH Pages with documentation * Rewrite tests to use Silly * Fixed false positives with should.exists . The old approach to see if is convertible to null, wasn't working. * Fixed .match(ctRegex) . Now mimics how std.regex : match handles it * Improved the test battery to detect false positives. * Documenting the source code, so ddoc can generate the documentation. I think that v0.2.2 could be released as not beta version, but I keep confused about why Windows LDC 32 bit version keep failing when tries to build&execute the tests... On my TODOs list for v0.3 I have : * Rename module to pijamas * Add .empty that it's equivalent to .length(0) * Handle range.should.be.equal([1, 2, 3]) * Test if a .instanceOf could be posible * See if (throwing expression).should.Throw!Exception could be done, and avoid passing a pointer to a function like actually does. In other words, work like assertThorow!Exception(expression) * Try to hide Assertation class (Volvemort class perhaps?) and get out the public methods to avoid Assertation spaming on autogenerated documentation. |
May 15, 2020 Re: Pijamas, a simple fluent assertation library (forked from Pyjamas) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Luis | On Friday, 15 May 2020 at 12:35:27 UTC, Luis wrote: > On my run to raise stuff from dead packages, I come with Pijamas. A fork from Yamadacpc’s Pyjamas that works with D frontend 2.090 and forwards. > > [...] I was about to ask what is broken with ctRegex (well except that compiler usually explodes trying to swallow it) > > [...] |
May 15, 2020 Re: Pijamas, a simple fluent assertation library (forked from Pyjamas) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dmitry Olshansky | On Friday, 15 May 2020 at 14:42:47 UTC, Dmitry Olshansky wrote: > On Friday, 15 May 2020 at 12:35:27 UTC, Luis wrote: >> On my run to raise stuff from dead packages, I come with Pijamas. A fork from Yamadacpc’s Pyjamas that works with D frontend 2.090 and forwards. >> >> [...] > > I was about to ask what is broken with ctRegex (well except that compiler usually explodes trying to swallow it) >> >> [...] Indeed. Was this error : dub test Generating test runner configuration 'pyjamas-test-unittest' for 'unittest' (library). Performing "unittest" build using /usr/bin/dmd for x86_64. pyjamas 0.2.1+commit.20.g765cd5c: building configuration "pyjamas-test-unittest"... tests/pyjamas_spec.d(154,22): Error: template pyjamas.Assertion!string.Assertion.match cannot deduce function from argument types !()(CTRegexWrapper!char), candidates are: source/pyjamas.d(273,10): match(RegEx)(RegEx re, string file = __FILE__, size_t line = __LINE__) with RegEx = CTRegexWrapper!char must satisfy one of the following constraints: is(RegEx == RegexOfT) is(RegEx == StaticRegexOfT) isSomeString!RegEx tests/pyjamas_spec.d(155,45): Error: template pyjamas.Assertion!string.Assertion.match cannot deduce function from argument types !()(CTRegexWrapper!char), candidates are: source/pyjamas.d(273,10): match(RegEx)(RegEx re, string file = __FILE__, size_t line = __LINE__) with RegEx = CTRegexWrapper!char must satisfy one of the following constraints: is(RegEx == RegexOfT) is(RegEx == StaticRegexOfT) isSomeString!RegEx /usr/bin/dmd failed with exit code 1. |
May 15, 2020 Re: Pijamas, a simple fluent assertation library (forked from Pyjamas) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dmitry Olshansky | On Friday, 15 May 2020 at 14:42:47 UTC, Dmitry Olshansky wrote: > compiler usually explodes trying to swallow it https://media.giphy.com/media/tfxgAK370HzEY/giphy.gif |
May 15, 2020 Re: Pijamas, a simple fluent assertation library (forked from Pyjamas) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Luis | .empty and .throw are not that difficult: see https://code.dlang.org/packages/dshould On Friday, 15 May 2020 at 12:35:27 UTC, Luis wrote: > On my TODOs list for v0.3 I have : > > * Rename module to pijamas > * Add .empty that it's equivalent to .length(0) > * Handle range.should.be.equal([1, 2, 3]) > * Test if a .instanceOf could be posible > * See if (throwing expression).should.Throw!Exception could be done, and avoid passing a pointer to a function like actually does. In other words, work like assertThorow!Exception(expression) > * Try to hide Assertation class (Volvemort class perhaps?) and get out the public methods to avoid Assertation spaming on autogenerated documentation. |
Copyright © 1999-2021 by the D Language Foundation