This adds regression tests for issue #3337pull/3339/head
parent
b4aee4675a
commit
ad2ab56e5f
6 changed files with 40 additions and 8 deletions
@ -1,8 +1,8 @@ |
|||||||
project('D Unittests', 'd') |
project('D Unittests', 'd') |
||||||
|
|
||||||
e = executable('dapp', 'app.d', install : true) |
e = executable('dapp', ['app.d', 'second_unit.d'], install : true) |
||||||
test('dapp_run', e, should_fail: true) |
test('dapp_run', e, should_fail: true) |
||||||
|
|
||||||
e_test = executable('dapp_test', 'app.d', |
e_test = executable('dapp_test', ['app.d', 'second_unit.d'], |
||||||
d_args: meson.get_compiler('d').unittest_args()) |
d_unittest: true) |
||||||
test('dapp_test', e_test) |
test('dapp_test', e_test) |
||||||
|
@ -0,0 +1,10 @@ |
|||||||
|
|
||||||
|
void secondModuleTestFunc () |
||||||
|
{ |
||||||
|
import std.stdio : writeln; |
||||||
|
|
||||||
|
version (unittest) |
||||||
|
writeln ("Hello!"); |
||||||
|
else |
||||||
|
assert (0); |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
|
||||||
|
auto secondModulePeopleVersionSet () |
||||||
|
{ |
||||||
|
version (With_People) { |
||||||
|
return true; |
||||||
|
} else { |
||||||
|
return false; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue