sources
This commit is contained in:
parent
1d0a2964cf
commit
151d77ee54
11 changed files with 340 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
import std.math;
|
||||
|
||||
class Test
|
||||
{
|
||||
double a = 0.4;
|
||||
double b;
|
||||
|
||||
this(int b)
|
||||
{
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
this() {}
|
||||
}
|
||||
|
||||
unittest
|
||||
{
|
||||
auto t = new Test(5);
|
||||
auto z = new Test;
|
||||
|
||||
assert(t.b == 5);
|
||||
assert(isNaN(z.b));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue