Refactor to remove dependency of DrivenEngine on World

This commit is contained in:
2026-02-24 22:36:01 -05:00
parent 8889a36ba3
commit a7027873ab
10 changed files with 194 additions and 92 deletions

View File

@@ -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);
}