diff options
Diffstat (limited to 'tests/listtest.cpp')
-rw-r--r-- | tests/listtest.cpp | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/tests/listtest.cpp b/tests/listtest.cpp index 0bcfeed..50df61e 100644 --- a/tests/listtest.cpp +++ b/tests/listtest.cpp @@ -1,5 +1,10 @@ -/* - * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org) +/****************************************************************************** + * + * listtest.cpp - + * + * $Id: listtest.cpp 2893 2013-07-16 03:07:02Z scribe $ + * + * Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society * P. O. Box 2528 * Tempe, AZ 85280-2528 @@ -31,15 +36,15 @@ int main(int argc, char **argv) SWKey text; VerseKey vk("jn 1:1", "jn 1:12"); vk = "jas 1:19"; - cout << "\nError should be set: " << ((vk.Error()) ? "set":"not set"); + cout << "\nError should be set: " << ((vk.popError()) ? "set":"not set"); text = (const char *)vk; cout << "\nshould be jn 1.12: " << text << "\n"; vk = "mat 1:19"; - cout << "\nError should be set: " << ((vk.Error()) ? "set":"not set"); + cout << "\nError should be set: " << ((vk.popError()) ? "set":"not set"); text = (const char *)vk; cout << "\nshould be jn 1.1: " << text << "\n"; vk = "jn 1:7"; - cout << "\nError should not be set: " << ((vk.Error()) ? "set":"not set"); + cout << "\nError should not be set: " << ((vk.popError()) ? "set":"not set"); text = (const char *)vk; cout << "\nshould be jn 1.7: " << text << "\n"; @@ -59,13 +64,13 @@ int main(int argc, char **argv) lk2 << lk; lk2 << vk2; lk2 << "test2"; - for (lk2 = TOP; !lk2.Error(); lk2++) { + for (lk2 = TOP; !lk2.popError(); lk2++) { cout << (const char *) lk2 << "\n"; } cout << "\n\n---------\n"; - lk2 = VerseKey().ParseVerseList("1jn-2jn;mk1.9", 0, true); + lk2 = VerseKey().parseVerseList("1jn-2jn;mk1.9", 0, true); // c-tor not bound setting, just parsing to jn.1.1 VerseKey yoyo("john"); @@ -91,23 +96,23 @@ int main(int argc, char **argv) */ - for (lk2 = TOP; !lk2.Error(); lk2++) + for (lk2 = TOP; !lk2.popError(); lk2++) cout << (const char *) lk2 << "\n"; - lk.ClearList(); + lk.clear(); lk << "john 3:16"; - cout << "\nCount should be 1: " << lk.Count(); + cout << "\nCount should be 1: " << lk.getCount(); - lk = vk.ParseVerseList("mat;mark;luke", vk, true); + lk = vk.parseVerseList("mat;mark;luke", vk, true); lk = (VerseKey)"mark 3:16"; - cout << "\nError should not be set: " << ((lk.Error()) ? "set":"not set"); + cout << "\nError should not be set: " << ((lk.popError()) ? "set":"not set"); lk = (VerseKey)"john 3:16"; - cout << "\nError should be set: " << ((lk.Error()) ? "set":"not set"); - lk = vk.ParseVerseList("mk 3:16", vk, true); + cout << "\nError should be set: " << ((lk.popError()) ? "set":"not set"); + lk = vk.parseVerseList("mk 3:16", vk, true); lk = (VerseKey)"john 3:16"; - cout << "\nError should be set: " << ((lk.Error()) ? "set":"not set"); + cout << "\nError should be set: " << ((lk.popError()) ? "set":"not set"); lk = (VerseKey)"mark 3:16"; - cout << "\nError should not be set: " << ((lk.Error()) ? "set":"not set"); + cout << "\nError should not be set: " << ((lk.popError()) ? "set":"not set"); cout << "\n\n"; return 0; |