digitalmars.D.announce - unit-threaded v1.0.0
- Atila Neves (7/7) May 28 2020 I decided to stop being like Google and finally tag version 1 of
- Russel Winder (11/20) May 28 2020 This last is sad, for me. I like using test functions rather than named
- jmh530 (10/13) May 28 2020 I recall playing with them when it was originally announced and
- Atila Neves (3/18) Jun 01 2020 The assertions are their own subpackage, as is the runner, and
- Atila Neves (6/19) Jun 01 2020 Out of curiosity, what is the difference for you between:
- Russel Winder (19/27) Jun 01 2020 On Mon, 2020-06-01 at 08:41 +0000, Atila Neves via Digitalmars-d-announc...
- Mike Parker (2/7) Jun 01 2020 Each unittest block is a function.
- ag0aep6g (14/15) May 29 2020 You got a bad @trusted:
- Atila Neves (3/18) Jun 01 2020 That got fixed a few weeks back - your code doesn't compile for
- ag0aep6g (21/22) Jun 01 2020 Huh. Maybe you forgot to commit that? I'm just running this through `dub...
- Atila Neves (3/26) Jun 02 2020 I missed that you imported `unit_threaded.light`. Thanks for
I decided to stop being like Google and finally tag version 1 of unit-threaded: https://code.dlang.org/packages/unit-threaded From now on I'm going to focus on compilation speed (no matter how ugly that might make the implementation), and also dropping support in v2.x.x for anything other than unittest blocks (bye bye test classes and functions).
May 28 2020
On Thu, 2020-05-28 at 15:35 +0000, Atila Neves via Digitalmars-d-announce wrote:I decided to stop being like Google and finally tag version 1 of=20 unit-threaded: =20 https://code.dlang.org/packages/unit-threaded =20 From now on I'm going to focus on compilation speed (no matter=20 how ugly that might make the implementation), and also dropping=20 support in v2.x.x for anything other than unittest blocks (bye=20 bye test classes and functions).This last is sad, for me. I like using test functions rather than named unittest blocks. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
May 28 2020
On Thursday, 28 May 2020 at 17:45:26 UTC, Russel Winder wrote:[snip] This last is sad, for me. I like using test functions rather than named unittest blocks.I recall playing with them when it was originally announced and thought they were quite nice, but I haven't used them since. The unit-threaded library certainly seems chocked full of features. Some of them overlap with the fluent-asserts library. It may make sense to split off some of that stuff as well so that people can evaluate custom assert libraries on their own merits. Similarly, the mocking and integration stuff could probably (?) be split off into separate packages. This would imply unit-threaded could be focused on the runner subpackage.
May 28 2020
On Thursday, 28 May 2020 at 19:01:22 UTC, jmh530 wrote:On Thursday, 28 May 2020 at 17:45:26 UTC, Russel Winder wrote:The assertions are their own subpackage, as is the runner, and mocking, and integration.[snip] This last is sad, for me. I like using test functions rather than named unittest blocks.I recall playing with them when it was originally announced and thought they were quite nice, but I haven't used them since. The unit-threaded library certainly seems chocked full of features. Some of them overlap with the fluent-asserts library. It may make sense to split off some of that stuff as well so that people can evaluate custom assert libraries on their own merits. Similarly, the mocking and integration stuff could probably (?) be split off into separate packages. This would imply unit-threaded could be focused on the runner subpackage.
Jun 01 2020
On Thursday, 28 May 2020 at 17:45:26 UTC, Russel Winder wrote:On Thu, 2020-05-28 at 15:35 +0000, Atila Neves via Digitalmars-d-announce wrote:Out of curiosity, what is the difference for you between: testFoo() { /* ... */ } and: ("foo") unittest { /* ... */ }I decided to stop being like Google and finally tag version 1 of unit-threaded: https://code.dlang.org/packages/unit-threaded From now on I'm going to focus on compilation speed (no matter how ugly that might make the implementation), and also dropping support in v2.x.x for anything other than unittest blocks (bye bye test classes and functions).This last is sad, for me. I like using test functions rather than named unittest blocks.
Jun 01 2020
On Mon, 2020-06-01 at 08:41 +0000, Atila Neves via Digitalmars-d-announce wrote: [=E2=80=A6]Out of curiosity, what is the difference for you between: =20 testFoo() { /* ... */ } =20 and: =20 ("foo") unittest { /* ... */ }Primarily consistency with the way all other unit test frameworks which are based on test functions =E2=80=93 I am not a fan of class-based unit tests = hence using pytest in favour of unittest in Python. Using functions just feels more normal. Secondarily lack of understanding of the scope rules of multiple unittest blocks. In the end though I use whatever is provided. So if functions are for the chop, I will switch to using labelled unittest blocks. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
Jun 01 2020
On Monday, 1 June 2020 at 09:08:01 UTC, Russel Winder wrote:Secondarily lack of understanding of the scope rules of multiple unittest blocks. In the end though I use whatever is provided. So if functions are for the chop, I will switch to using labelled unittest blocks.Each unittest block is a function.
Jun 01 2020
On 28.05.20 17:35, Atila Neves wrote:https://code.dlang.org/packages/unit-threadedYou got a bad trusted: ---- import unit_threaded.light: check; void main() safe { check!((int a) system { /* ... can do unsafe stuff here ... */ return true; }); } ---- I searched for "trusted" and that was the first hit. I didn't look further. There's probably more.
May 29 2020
On Friday, 29 May 2020 at 14:20:53 UTC, ag0aep6g wrote:On 28.05.20 17:35, Atila Neves wrote:That got fixed a few weeks back - your code doesn't compile for me.https://code.dlang.org/packages/unit-threadedYou got a bad trusted: ---- import unit_threaded.light: check; void main() safe { check!((int a) system { /* ... can do unsafe stuff here ... */ return true; }); } ---- I searched for "trusted" and that was the first hit. I didn't look further. There's probably more.
Jun 01 2020
On 01.06.20 10:49, Atila Neves wrote:That got fixed a few weeks back - your code doesn't compile for me.Huh. Maybe you forgot to commit that? I'm just running this through `dub --single test.d`: ---- /+ dub.json: { "dependencies": { "unit-threaded": "~>1.0.0", }, } +/ import unit_threaded.light: check; void main() safe { check!((int a) system { /* ... can do unsafe stuff here ... */ return true; }); } ---- https://run.dlang.io/is/NbiYBB
Jun 01 2020
On Monday, 1 June 2020 at 09:03:20 UTC, ag0aep6g wrote:On 01.06.20 10:49, Atila Neves wrote:I missed that you imported `unit_threaded.light`. Thanks for reporting! That whole module needs to be redone.That got fixed a few weeks back - your code doesn't compile for me.Huh. Maybe you forgot to commit that? I'm just running this through `dub --single test.d`: ---- /+ dub.json: { "dependencies": { "unit-threaded": "~>1.0.0", }, } +/ import unit_threaded.light: check; void main() safe { check!((int a) system { /* ... can do unsafe stuff here ... */ return true; }); } ---- https://run.dlang.io/is/NbiYBB
Jun 02 2020