mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit Tests
- Simplified the msg.t.cpp tests.
This commit is contained in:
parent
a2cae67644
commit
d390f99fc5
1 changed files with 8 additions and 13 deletions
|
@ -25,8 +25,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <Context.h>
|
||||
#include <Msg.h>
|
||||
#include <test.h>
|
||||
|
@ -38,10 +36,6 @@ int main (int argc, char** argv)
|
|||
{
|
||||
UnitTest t (12);
|
||||
|
||||
// Ensure environment has no influence.
|
||||
unsetenv ("TASKDATA");
|
||||
unsetenv ("TASKRC");
|
||||
|
||||
Msg m;
|
||||
t.is (m.serialize (), std::string ("client: ") + PACKAGE_STRING + "\n\n\n", "Msg::serialize '' --> '\\n\\n'");
|
||||
|
||||
|
@ -65,6 +59,7 @@ int main (int argc, char** argv)
|
|||
t.is (m3.get ("foo"), "bar", "Msg::get");
|
||||
t.is (m3.get ("name"), "value", "Msg::get");
|
||||
t.is (m3.getPayload (), "payload\n", "Msg::getPayload");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue