Using autowrap to build a D library for Python

2020-06-16 Thread tastyminerals via Digitalmars-d-learn
I am trying out autowrap to build a D library for Python. After I ran "dub build" which builds mylib.so and try to import it in Python interpreter, I get: "ImportError: dynamic module does not define module export function (PyInit_libautowrap_mylib)" Which means the library was build for

Link error triggered by `dub test` but not by `dub build --unittest`

2020-06-16 Thread Per Nordlöw via Digitalmars-d-learn
Inside https://github.com/nordlow/phobos-next/ doing dub build --compiler=dmd --build=unittest works but dub test --compiler=dmd fails as Generating test runner configuration 'phobos-next-test-library' for 'library' (library). Performing "unittest" build using /usr/bin/dmd for

Re: Finding the file and unittest that triggers an ICE during dub project build only when unittests are enabled

2020-06-16 Thread Per Nordlöw via Digitalmars-d-learn
On Monday, 15 June 2020 at 18:48:04 UTC, Per Nordlöw wrote: This doesn't seem like an intuitive interface to me. I would like `dub dustmite` to work directly inside the source tree by creating a temporary copy of the root directory of a clean git repo checkout (excluding the .git* files) where

Re: unit test that show more than one failure

2020-06-16 Thread Dukc via Digitalmars-d-learn
On Tuesday, 16 June 2020 at 06:19:51 UTC, Joel wrote: I've tired different unit test libraries, but they jump out on errors instead of just adding to failed numbers. I'm thinking like this: ``` @("dummy"); unittset { 0.shouldEqual(0); 1.shouldEqual(2); 2.shouldEqual(3); } ``` Test:

Re: unit test that show more than one failure

2020-06-16 Thread Joel via Digitalmars-d-learn
On Tuesday, 16 June 2020 at 07:39:20 UTC, Luis wrote: On Tuesday, 16 June 2020 at 06:19:51 UTC, Joel wrote: [...] I understand that where the trivial test code is placed, must be something more complex being tested. @("dummy test 1"); unittest { /// Some test code that runs fine }

Re: How to create Multi Producer-Single Consumer concurrency

2020-06-16 Thread Ali Çehreli via Digitalmars-d-learn
On 6/12/20 3:02 PM, adnan338 wrote: > So there are multiple "download finished" message producers, and one > consumer of those messages. Furthermore, that producer has a callback > that triggers an UI object. That's almost exactly what I do in some of my programs. I use std.concurrency and the

Re: unit test that show more than one failure

2020-06-16 Thread Luis via Digitalmars-d-learn
On Tuesday, 16 June 2020 at 06:19:51 UTC, Joel wrote: I've tired different unit test libraries, but they jump out on errors instead of just adding to failed numbers. I'm thinking like this: ``` @("dummy"); unittset { 0.shouldEqual(0); 1.shouldEqual(2); 2.shouldEqual(3); } ``` Test:

Re: unit test that show more than one failure

2020-06-16 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 16 June 2020 at 06:19:51 UTC, Joel wrote: I've tired different unit test libraries, but they jump out on errors instead of just adding to failed numbers. I'm thinking like this: ``` @("dummy"); unittset { 0.shouldEqual(0); 1.shouldEqual(2); 2.shouldEqual(3); } ``` Test:

unit test that show more than one failure

2020-06-16 Thread Joel via Digitalmars-d-learn
I've tired different unit test libraries, but they jump out on errors instead of just adding to failed numbers. I'm thinking like this: ``` @("dummy"); unittset { 0.shouldEqual(0); 1.shouldEqual(2); 2.shouldEqual(3); } ``` Test: dummy test passed line 10: 0 is equal to 0 test failed