summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-Http.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/test-Http.cc b/tests/test-Http.cc
index cd183ce..1ea040b 100644
--- a/tests/test-Http.cc
+++ b/tests/test-Http.cc
@@ -25,13 +25,20 @@ const char htmlTemplateStr[] =
"</html>\n"
;
-class TestHtmlTemplate : public AtStart {
- public:
- TestHtmlTemplate() : AtStart(10), htmlTemplate(m_template) { }
- virtual void doStart() { m_template.setTemplate(htmlTemplateStr); }
+class TestHtmlTemplateTask : public Task {
+ virtual void Do() { m_template.setTemplate(htmlTemplateStr); }
+ virtual const char * getName() const { return "TestHtmlTemplateTask"; }
+ SimpleMustache & m_template;
+public:
+ TestHtmlTemplateTask(SimpleMustache & htmlTemplate) : m_template(htmlTemplate) { }
+};
+class TestHtmlTemplate : public AtStartAsTask {
+ public:
+ TestHtmlTemplate() : AtStartAsTask(10), htmlTemplate(m_template) { }
+ virtual Task * createStartTask() { return new TestHtmlTemplateTask(m_template); }
const SimpleMustache & htmlTemplate;
- private:
+ public:
SimpleMustache m_template;
};