-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from llJochemll/next
Fix build error
- Loading branch information
Showing
2 changed files
with
46 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,53 @@ | ||
module quirks.internal.test; | ||
|
||
public import fluent.asserts; | ||
|
||
struct TestStruct { | ||
static long classifier; | ||
|
||
long id; | ||
int age; | ||
|
||
static TestStruct create() { | ||
return TestStruct(); | ||
version (unittest) { | ||
public import fluent.asserts; | ||
|
||
struct TestStruct { | ||
static long classifier; | ||
|
||
long id; | ||
int age; | ||
|
||
static TestStruct create() { | ||
return TestStruct(); | ||
} | ||
|
||
string name() { | ||
return "name"; | ||
} | ||
void update() { } | ||
void update(bool force) { } | ||
} unittest { | ||
TestStruct s; | ||
|
||
s.create.should.not.throwAnyException; | ||
s.name.should.equal("name"); | ||
s.update.should.not.throwAnyException; | ||
s.update(false).should.not.throwAnyException; | ||
} | ||
|
||
string name() { | ||
return "name"; | ||
} | ||
void update() { } | ||
void update(bool force) { } | ||
} unittest { | ||
TestStruct s; | ||
|
||
s.create.should.not.throwAnyException; | ||
s.name.should.equal("name"); | ||
s.update.should.not.throwAnyException; | ||
s.update(false).should.not.throwAnyException; | ||
} | ||
class TestClass { | ||
static long classifier; | ||
|
||
class TestClass { | ||
static long classifier; | ||
long id; | ||
int age; | ||
|
||
long id; | ||
int age; | ||
static TestClass create() { | ||
return new TestClass(); | ||
} | ||
|
||
static TestClass create() { | ||
return new TestClass(); | ||
} | ||
string name() { | ||
return "name"; | ||
} | ||
void update() { } | ||
void update(bool force) { } | ||
} unittest { | ||
auto c = new TestClass; | ||
|
||
string name() { | ||
return "name"; | ||
c.create.should.not.throwAnyException; | ||
c.name.should.equal("name"); | ||
c.update.should.not.throwAnyException; | ||
c.update(false).should.not.throwAnyException; | ||
} | ||
void update() { } | ||
void update(bool force) { } | ||
} unittest { | ||
auto c = new TestClass; | ||
|
||
c.create.should.not.throwAnyException; | ||
c.name.should.equal("name"); | ||
c.update.should.not.throwAnyException; | ||
c.update(false).should.not.throwAnyException; | ||
} |