On Sat, May 13, 2017 at 12:39:43PM -0400, Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 5/12/17 5:46 PM, H. S. Teoh via Digitalmars-d-learn wrote:
[...]
> > This advice, unfortunately, needs to be tempered with caution about
> > namespace pollution and accidental dependency of things ou
On 5/12/17 5:46 PM, H. S. Teoh via Digitalmars-d-learn wrote:
On Fri, May 12, 2017 at 05:23:23PM -0400, Steven Schveighoffer via
Digitalmars-d-learn wrote:
[...]
Note, you can achieve what you want with version(unittest):
version(unittest)
{
class A { B b; }
class B { }
}
unittest
{
On Friday, May 12, 2017 14:46:30 H. S. Teoh via Digitalmars-d-learn wrote:
> On Fri, May 12, 2017 at 05:23:23PM -0400, Steven Schveighoffer via
> Digitalmars-d-learn wrote: [...]
>
> > Note, you can achieve what you want with version(unittest):
> >
> > version(unittest)
> > {
> >
> >class A { B
On Fri, May 12, 2017 at 05:23:23PM -0400, Steven Schveighoffer via
Digitalmars-d-learn wrote:
[...]
> Note, you can achieve what you want with version(unittest):
>
> version(unittest)
> {
>class A { B b; }
>class B { }
> }
>
> unittest
> {
>// use A and B here
> }
[...]
This advice,
On Friday, 12 May 2017 at 21:23:23 UTC, Steven Schveighoffer
wrote:
Note, you can achieve what you want with version(unittest):
Please prefer `private version(unittest){...}` if the module
might be imported by someone else's code, as to not pollute it
with unneeded symbols
On 5/10/17 12:53 PM, Raiderium wrote:
On Wednesday, 10 May 2017 at 16:32:11 UTC, Adam D. Ruppe wrote:
On Wednesday, 10 May 2017 at 16:09:06 UTC, Raiderium wrote:
I can't figure out if this is intended behaviour.
It is. A unittest is a function, and in functions, all declarations
must be defin
On 2017-05-10 18:17, Stefan Koch wrote:
It looks like this unitest-test block are treated like a function.
unittest blocks are lowered to functions.
--
/Jacob Carlborg
On Wednesday, 10 May 2017 at 16:32:11 UTC, Adam D. Ruppe wrote:
On Wednesday, 10 May 2017 at 16:09:06 UTC, Raiderium wrote:
I can't figure out if this is intended behaviour.
It is. A unittest is a function, and in functions, all
declarations must be defined before used (just like local
varia
On Wednesday, 10 May 2017 at 16:09:06 UTC, Raiderium wrote:
I can't figure out if this is intended behaviour.
It is. A unittest is a function, and in functions, all
declarations must be defined before used (just like local
variables).
Sometimes, you can wrap it in a struct:
unittest {
st
On Wednesday, 10 May 2017 at 16:09:06 UTC, Raiderium wrote:
Heyo,
On 2.074.0, the following test fails with "Error: undefined
identifier 'B' "
unittest
{
class A { B b; }
class B { }
}
I can't figure out if this is intended behaviour. It's making a
template-heavy module diff
Heyo,
On 2.074.0, the following test fails with "Error: undefined
identifier 'B' "
unittest
{
class A { B b; }
class B { }
}
I can't figure out if this is intended behaviour. It's making a
template-heavy module difficult to test. Would appreciate any
help.
First post here,
11 matches
Mail list logo