On Sunday, 19 May 2019 at 16:47:39 UTC, Mike Brockus wrote:
On Sunday, 19 May 2019 at 07:46:11 UTC, Johannes Loher wrote:
Am 18.05.19 um 08:20 schrieb Mike Brockus:
[...]
Hey there,
I already tried to answer your questions on reddit.
You can post links here by simply pasting the URL (the link
will not be highlighted in the editor, but it will be when it
is posted).
Regarding your problem: Could you please describe what you are
actually trying to do? Are you trying to use D in an exisiting
Meson project (as an addition to the existing code)? Why are
you trying to use the Unity test framework (I only had a quick
look at it, but from what I saw it uses a lot of preprocessor
macros which will make it difficult to get it wotk work
properly with D). Why not use the built-in unittests or one of
the many already existing unit testing frameworks for D ([1],
[2], [3], [4], [5])?
[1] https://code.dlang.org/packages/unit-threaded
[2] https://code.dlang.org/packages/dunit
[3] https://code.dlang.org/packages/d-unit
[4] https://code.dlang.org/packages/fluent-asserts
[5] https://code.dlang.org/packages/trial
I am trying to do two things one being able to turn a pure C
project into a pure D project without destroying the existing
file structure.
The project (https://github.com/squidfarts/c-project.git)
The other is to make a new Arduino UNO board project that
leverages existing C and C++ code so I can spend small amounts
of time writing new D code as I update all of my Arduino
applications.
I would like to use the Unity test framework for that Arduino
UNO based project that uses D, C, C++ and both Meson build
system and Conan package manager. The part with C and C++ are
just for linking with the Arduino libraries, including exiting
classes while I write new D code to replace the existing C and
C++ code where ever it makes since. Conan is used to get both
the Unity and CMock from GitHub.
For the pure D project I would like to use whatever D provides
me. Since you provided this list I would start with
unit-threaded and see if it can help with this main function
problem.
Hey again, does my answer from reddit not solve your first
problem (keeping the existing file structure)? As mentioned,
using Unity for the tests does not really make sense with D,
though it might be possible to use it with dpp ([1]).
Regarding your second problem: The Arduino UNO is based on the
ATmega328P, which is an AVR chip. There is currently no D
compiler available, that targets AVR, so you won‘t be able to use
D for programming your Arduino UNO for now. There have been
discussions about this ([2], [3]), but for now it is simply not
possible.
[1] https://github.com/atilaneves/dpp
[2]
https://forum.dlang.org/thread/1328258826.2142.4.camel@ububox?page=1
[3]
https://forum.dlang.org/thread/zvderukicijcuxgqg...@forum.dlang.org