Refactor to remove dependency of DrivenEngine on World
This commit is contained in:
@@ -23,7 +23,7 @@ static void dump_lines(StreamBuffer *in, int chid) {
|
||||
class DriverWebServerTest : public DrivenEngine {
|
||||
public:
|
||||
eng::vector<SharedChannel> channels_;
|
||||
DriverWebServerTest() {
|
||||
DriverWebServerTest(EngineWrapper *) {
|
||||
SharedChannel ch = new_outgoing_channel("cert:stanford.edu:443");
|
||||
ch->out()->write_bytes("GET https://stanford.edu/xbanankjdsh.html HTTP/1.1\n\n");
|
||||
channels_.emplace_back(std::move(ch));
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
class DriverDNSFailTest : public DrivenEngine {
|
||||
public:
|
||||
eng::vector<SharedChannel> channels_;
|
||||
DriverDNSFailTest() {
|
||||
DriverDNSFailTest(EngineWrapper *) {
|
||||
SharedChannel ch = new_outgoing_channel("akjsdkajshdakjshd.alk:80");
|
||||
ch->out()->write_bytes("GET http://stanford.edu/index.html HTTP/1.1\n\n");
|
||||
channels_.emplace_back(std::move(ch));
|
||||
@@ -72,7 +72,7 @@ class DriverPrintClockTest : public DrivenEngine {
|
||||
public:
|
||||
int count_;
|
||||
double last_clock_;
|
||||
DriverPrintClockTest() {
|
||||
DriverPrintClockTest(EngineWrapper *) {
|
||||
count_ = 0;
|
||||
last_clock_ = 0.0;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ class RunUnitTests : public DrivenEngine {
|
||||
public:
|
||||
UniqueWorld world_;
|
||||
|
||||
RunUnitTests() {
|
||||
RunUnitTests(EngineWrapper *) {
|
||||
world_.reset(new World(WORLD_TYPE_MASTER));
|
||||
rescan_lua_source(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user