Skip tests for missing features on macOS.

This commit is contained in:
Sönke Ludwig 2017-01-22 20:54:56 +01:00
parent c32a4d6da9
commit 8bf742d3cc
3 changed files with 13 additions and 0 deletions

View file

@ -16,6 +16,9 @@ enum testFilename = "test.dat";
void main() void main()
{ {
version (OSX) writefln("Directory watchers are not yet supported on macOS. Skipping test.");
else:
if (exists(testFilename)) if (exists(testFilename))
remove(testFilename); remove(testFilename);

View file

@ -14,6 +14,9 @@ bool s_done;
void main() void main()
{ {
version (OSX) writefln("Signals are not yet supported on macOS. Skipping test.");
else:
auto id = eventDriver.signals.listen(SIGRTMIN+1, (id, status, sig) { auto id = eventDriver.signals.listen(SIGRTMIN+1, (id, status, sig) {
assert(!s_done); assert(!s_done);
assert(status == SignalStatus.ok); assert(status == SignalStatus.ok);

View file

@ -14,6 +14,12 @@ bool s_done;
void main() void main()
{ {
version (OSX) {
import std.stdio;
writeln("This doesn't work on macOS. Skipping this test until it is determined that this special case should stay supported.");
return;
} else:
static ubyte[] pack1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; static ubyte[] pack1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
auto baddr = new InternetAddress(0x7F000001, 40002); auto baddr = new InternetAddress(0x7F000001, 40002);
@ -28,6 +34,7 @@ void main()
assert(bts == 0); assert(bts == 0);
incoming.read!((status, bts) { incoming.read!((status, bts) {
import std.stdio; try writefln("status %s", status); catch (Exception e) assert(false, e.msg);
assert(status == IOStatus.ok); assert(status == IOStatus.ok);
assert(bts == pack1.length); assert(bts == pack1.length);
assert(s_rbuf[0 .. bts] == pack1); assert(s_rbuf[0 .. bts] == pack1);