[sword-cvs] sword/tests listtest.cpp,1.5,1.6
sword at www.crosswire.org
sword at www.crosswire.org
Sat May 8 14:04:45 MST 2004
Update of /cvs/core/sword/tests
In directory www:/tmp/cvs-serv25446/tests
Modified Files:
listtest.cpp
Log Message:
Fixed ListKey contains function and normalized Traversable method name
Index: listtest.cpp
===================================================================
RCS file: /cvs/core/sword/tests/listtest.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- listtest.cpp 1 Oct 2002 19:52:41 -0000 1.5
+++ listtest.cpp 8 May 2004 21:04:43 -0000 1.6
@@ -30,7 +30,7 @@
std::cout << (const char *) lk2 << "\n";
- lk2 = VerseKey().ParseVerseList("mat-john", 0, true);
+ lk2 = VerseKey().ParseVerseList("mat-mark", 0, true);
VerseKey yoyo("john");
yoyo = MAXCHAPTER;
@@ -57,5 +57,17 @@
for (lk2 = TOP; !lk2.Error(); lk2++)
std::cout << (const char *) lk2 << "\n";
+ lk.ClearList();
+ lk << "john 3:16";
+ std::cout << "\nCount should be 1: " << lk.Count();
+
+ lk = vk.ParseVerseList("mat;mark;luke", vk, true);
+ lk = (VerseKey)"john 3:16";
+ std::cout << "\nError should be set: " << ((lk.Error()) ? "set":"not set");
+ lk = vk.ParseVerseList("mk 3:16", vk, true);
+ lk = (VerseKey)"john 3:16";
+ std::cout << "\nError should be set: " << ((lk.Error()) ? "set":"not set");
+
+ std::cout << "\n\n";
return 0;
}
More information about the sword-cvs
mailing list