On Friday, January 26, 2018 14:23:20 Oleksii Skidan via Digitalmars-d-learn
wrote:
> On Friday, 26 January 2018 at 13:05:26 UTC, Jonathan M Davis
>
> wrote:
> > Why are you using strings for any of this? Printing out the
> > expression is kind of pointless. If you have the file and line
> >
On Friday, 26 January 2018 at 11:18:21 UTC, Oleksii Skidan wrote:
Hi,
I wonder if it's possible to convert D language code into a
string at compile time? C/C++ preprocessor has this feature
built-in: `#` preprocessing operator allows converting a macro
argument into a string constant. See
On Friday, 26 January 2018 at 13:25:12 UTC, Seb wrote:
On Friday, 26 January 2018 at 13:05:26 UTC, Jonathan M Davis
wrote:
If you don't think that simply using assertions for unit tests
is good enough, then I'd suggest that you look at
https://code.dlang.org/packages/unit-threaded
There's
On Friday, 26 January 2018 at 13:05:26 UTC, Jonathan M Davis
wrote:
On Friday, January 26, 2018 12:30:03 Oleksii Skidan via
Digitalmars-d-learn wrote:
On Friday, 26 January 2018 at 11:32:42 UTC, Mike Parker wrote:
> On Friday, 26 January 2018 at 11:18:21 UTC, Oleksii Skidan
>
> wrote:
>> [...]
On Friday, 26 January 2018 at 13:05:26 UTC, Jonathan M Davis
wrote:
Why are you using strings for any of this? Printing out the
expression is kind of pointless. If you have the file and line
number (which an AssertError will give you), then you know
where the failure is, and you can see the
On Friday, 26 January 2018 at 13:05:26 UTC, Jonathan M Davis
wrote:
If you don't think that simply using assertions for unit tests
is good enough, then I'd suggest that you look at
https://code.dlang.org/packages/unit-threaded
There's also https://code.dlang.org/packages/fluent-asserts which
On Friday, January 26, 2018 12:30:03 Oleksii Skidan via Digitalmars-d-learn
wrote:
> On Friday, 26 January 2018 at 11:32:42 UTC, Mike Parker wrote:
> > On Friday, 26 January 2018 at 11:18:21 UTC, Oleksii Skidan
> >
> > wrote:
> >> I could imagine a mixin-based solution in D:
> >> ```d
> >> //
On Friday, 26 January 2018 at 11:32:42 UTC, Mike Parker wrote:
On Friday, 26 January 2018 at 11:18:21 UTC, Oleksii Skidan
wrote:
I could imagine a mixin-based solution in D:
```d
// Usage:
ASSERT!"a == b";
```
But it seems a bit alien to me. First of all, it kind of
stringly-typed one.
On Friday, 26 January 2018 at 11:32:42 UTC, Mike Parker wrote:
On Friday, 26 January 2018 at 11:18:21 UTC, Oleksii Skidan
wrote:
I could imagine a mixin-based solution in D:
```d
// Usage:
ASSERT!"a == b";
```
But it seems a bit alien to me. First of all, it kind of
stringly-typed one.
On Friday, January 26, 2018 11:32:42 Mike Parker via Digitalmars-d-learn
wrote:
> On Friday, 26 January 2018 at 11:18:21 UTC, Oleksii Skidan wrote:
> > I could imagine a mixin-based solution in D:
> > ```d
> > // Usage:
> > ASSERT!"a == b";
> > ```
> > But it seems a bit alien to me. First of
On Friday, 26 January 2018 at 11:18:21 UTC, Oleksii Skidan wrote:
I could imagine a mixin-based solution in D:
```d
// Usage:
ASSERT!"a == b";
```
But it seems a bit alien to me. First of all, it kind of
stringly-typed one. Secondly, neither IDEs nor advanced text
editors are able to figure
On Friday, January 26, 2018 11:18:21 Oleksii Skidan via Digitalmars-d-learn
wrote:
> Hi,
>
> I wonder if it's possible to convert D language code into a
> string at compile time? C/C++ preprocessor has this feature
> built-in: `#` preprocessing operator allows converting a macro
> argument into a
Hi,
I wonder if it's possible to convert D language code into a
string at compile time? C/C++ preprocessor has this feature
built-in: `#` preprocessing operator allows converting a macro
argument into a string constant. See the following code snippet
for example:
```cplusplus
#define
13 matches
Mail list logo