Fresco/Babylon/demo normalize.cc,1.1,1.2
Tobias Hunger <[email protected]> Mon, 04 Aug 2003 13:59:37 -0500
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/Fresco/Babylon/demo
In directory purcel:/tmp/cvs-serv20843/Babylon/demo
Modified Files:
normalize.cc
Log Message:
* Add a unit test for characters without normalization: Those should
stay unchanged in all norms.
* Add FRESCO_TESTS environment var to specify whith test routines are
run by run_tests.sh in all tests. Run all tests if this variable is
unset.
Index: normalize.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Babylon/demo/normalize.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- normalize.cc 1 Aug 2003 16:47:09 -0000 1.1
+++ normalize.cc 4 Aug 2003 18:59:35 -0000 1.2
@@ -43,8 +43,15 @@
out << std::setw(8) << a.value();
}
-int dump_norms(const String & s)
+void dump_norms(const String & s)
{
+ for (String::const_iterator i = s.begin(); i != s.end(); ++i)
+ if (! i->is_defined())
+ {
+ std::cout << "UNDEFINED CHARACTER" << std::endl;
+ return;
+ }
+
for (String::const_iterator i = s.begin(); i != s.end(); ++i)
{
if (i != s.begin()) std::cout << " ";