Fix test compile errors.
This commit is contained in:
parent
ee1b9cbd4b
commit
bf519fd058
|
@ -7,7 +7,7 @@ module test;
|
|||
import eventcore.core;
|
||||
import std.stdio : File, writefln;
|
||||
import std.file : exists, remove;
|
||||
import core.time : msecs;
|
||||
import core.time : Duration, msecs;
|
||||
|
||||
bool s_done;
|
||||
int s_cnt = 0;
|
||||
|
@ -45,12 +45,12 @@ void main()
|
|||
auto fil = File(testFilename, "wt");
|
||||
|
||||
auto tm = eventDriver.timers.create();
|
||||
eventDriver.timers.set(tm, 100.msecs);
|
||||
eventDriver.timers.set(tm, 100.msecs, 0.msecs);
|
||||
eventDriver.timers.wait(tm, (tm) {
|
||||
scope (failure) assert(false);
|
||||
fil.write("test");
|
||||
fil.close();
|
||||
eventDriver.timers.set(tm, 100.msecs);
|
||||
eventDriver.timers.set(tm, 100.msecs, 0.msecs);
|
||||
eventDriver.timers.wait(tm, (tm) {
|
||||
scope (failure) assert(false);
|
||||
remove(testFilename);
|
||||
|
@ -58,7 +58,7 @@ void main()
|
|||
});
|
||||
|
||||
ExitReason er;
|
||||
do er = eventDriver.core.processEvents();
|
||||
do er = eventDriver.core.processEvents(Duration.max);
|
||||
while (er == ExitReason.idle);
|
||||
//assert(er == ExitReason.outOfWaiters); // FIXME: see above
|
||||
assert(s_done);
|
||||
|
|
|
@ -6,6 +6,7 @@ module test;
|
|||
|
||||
import eventcore.core;
|
||||
import std.stdio : writefln;
|
||||
import core.time : Duration;
|
||||
|
||||
bool s_done;
|
||||
|
||||
|
@ -23,7 +24,7 @@ void main()
|
|||
});
|
||||
|
||||
ExitReason er;
|
||||
do er = eventDriver.core.processEvents();
|
||||
do er = eventDriver.core.processEvents(Duration.max);
|
||||
while (er == ExitReason.idle);
|
||||
//assert(er == ExitReason.outOfWaiters); // FIXME: see above
|
||||
assert(s_done);
|
||||
|
|
|
@ -8,7 +8,7 @@ import eventcore.core;
|
|||
import std.stdio : writefln;
|
||||
import core.stdc.signal;
|
||||
import core.sys.posix.signal : SIGRTMIN;
|
||||
import core.time : msecs;
|
||||
import core.time : Duration, msecs;
|
||||
|
||||
bool s_done;
|
||||
|
||||
|
@ -23,13 +23,13 @@ void main()
|
|||
});
|
||||
|
||||
auto tm = eventDriver.timers.create();
|
||||
eventDriver.timers.set(tm, 500.msecs);
|
||||
eventDriver.timers.set(tm, 500.msecs, 0.msecs);
|
||||
eventDriver.timers.wait(tm, (tm) {
|
||||
() @trusted { raise(SIGRTMIN+1); } ();
|
||||
});
|
||||
|
||||
ExitReason er;
|
||||
do er = eventDriver.core.processEvents();
|
||||
do er = eventDriver.core.processEvents(Duration.max);
|
||||
while (er == ExitReason.idle);
|
||||
//assert(er == ExitReason.outOfWaiters); // FIXME: see above
|
||||
assert(s_done);
|
||||
|
|
|
@ -7,6 +7,7 @@ module test;
|
|||
import eventcore.core;
|
||||
import eventcore.socket;
|
||||
import std.socket : InternetAddress;
|
||||
import core.time : Duration;
|
||||
|
||||
DatagramSocket s_baseSocket;
|
||||
DatagramSocket s_freeSocket;
|
||||
|
@ -63,7 +64,7 @@ void main()
|
|||
})(pack1, IOMode.immediate);
|
||||
|
||||
ExitReason er;
|
||||
do er = eventDriver.core.processEvents();
|
||||
do er = eventDriver.core.processEvents(Duration.max);
|
||||
while (er == ExitReason.idle);
|
||||
//assert(er == ExitReason.outOfWaiters); // FIXME: see above
|
||||
assert(s_done);
|
||||
|
|
|
@ -18,6 +18,7 @@ import eventcore.core;
|
|||
import eventcore.socket;
|
||||
import std.file : exists, remove;
|
||||
import std.socket : UnixAddress;
|
||||
import core.time : Duration;
|
||||
|
||||
ubyte[256] s_rbuf;
|
||||
bool s_done;
|
||||
|
@ -75,7 +76,7 @@ void testDgram()
|
|||
|
||||
|
||||
ExitReason er;
|
||||
do er = eventDriver.core.processEvents();
|
||||
do er = eventDriver.core.processEvents(Duration.max);
|
||||
while (er == ExitReason.idle);
|
||||
//assert(er == ExitReason.outOfWaiters); // FIXME: see above
|
||||
assert(s_done);
|
||||
|
@ -130,7 +131,7 @@ void testStream()
|
|||
})(baddr);
|
||||
|
||||
ExitReason er;
|
||||
do er = eventDriver.core.processEvents();
|
||||
do er = eventDriver.core.processEvents(Duration.max);
|
||||
while (er == ExitReason.idle);
|
||||
//assert(er == ExitReason.outOfWaiters); // FIXME: see above
|
||||
assert(s_done);
|
||||
|
|
Loading…
Reference in a new issue