mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-02 14:38:34 +02:00
Enhancement - Object rename prior to integration
- T -> T2 - TDB -> TDB2
This commit is contained in:
parent
766c2d3620
commit
fe4c8f3a9d
12 changed files with 96 additions and 81 deletions
|
@ -30,7 +30,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (36);
|
||||
UnitTest t (38);
|
||||
|
||||
Att a1 ("name", "value");
|
||||
t.is (a1.name (), "name", "Att::Att (name, value), Att.name");
|
||||
|
@ -73,6 +73,12 @@ int main (int argc, char** argv)
|
|||
try {a6.addMod (Mod ("fartwizzle"));} catch (...) {good = false;}
|
||||
t.notok (good, "Att::addMod (fartwizzle)");
|
||||
|
||||
// Att::mods
|
||||
std::vector <Mod> mods;
|
||||
a6.mods (mods);
|
||||
t.is (mods.size (), (size_t)1, "Att::mods () size == 1");
|
||||
t.is (mods[0], "is", "Att::mods [0] == 'is'");
|
||||
|
||||
// Att::parse
|
||||
Nibbler n ("");
|
||||
Att a7;
|
||||
|
|
|
@ -32,11 +32,26 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
Record parseRecord (const std::string& input)
|
||||
{
|
||||
try { Record r (input); return r; }
|
||||
catch (...) {}
|
||||
try
|
||||
{
|
||||
Record r (input);
|
||||
return r;
|
||||
}
|
||||
|
||||
catch (std::string& e)
|
||||
{
|
||||
std::cout << "# Exception: " << e << std::endl;
|
||||
}
|
||||
|
||||
catch (...)
|
||||
{
|
||||
std::cout << "# Exception!" << std::endl;
|
||||
}
|
||||
|
||||
return Record ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (4);
|
||||
|
@ -49,8 +64,8 @@ int main (int argc, char** argv)
|
|||
record = parseRecord ("[]");
|
||||
t.is (record.size (), (size_t)0, "Record []");
|
||||
|
||||
// [name:value]
|
||||
record = parseRecord ("[name:value]");
|
||||
// [name:"value"]
|
||||
record = parseRecord ("[name:\"value\"]");
|
||||
t.is (record.size (), (size_t)1, "Record [name:value]");
|
||||
if (record.size () == 1)
|
||||
{
|
||||
|
@ -66,10 +81,6 @@ int main (int argc, char** argv)
|
|||
// TODO [name:"one two"]
|
||||
// TODO [one:two three:four]
|
||||
|
||||
// TODO FF3
|
||||
// TODO FF2
|
||||
// TODO FF1
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue