[uClibc-cvs] CVS uClibc++/tests

CVS User gkajmowi gkajmowi at codepoet.org
Mon Jan 3 16:28:53 UTC 2005


Update of /var/cvs/uClibc++/tests
In directory nail:/tmp/cvs-serv29451/tests

Modified Files:
	stringtest.cpp 
Log Message:
Addition of <iomanip> as well as minor syntax error fixes all over.

--- /var/cvs/uClibc++/tests/stringtest.cpp	2005/01/02 04:14:16	1.3
+++ /var/cvs/uClibc++/tests/stringtest.cpp	2005/01/03 16:28:51	1.4
@@ -106,7 +106,8 @@
 	std::cout << "\"is th\"" << std::endl;
 	std::cout << "\"" << a.substr(5, 5) << "\""  << std::endl;
 
-	std::cout << "\nChecking find on string \"" << std::endl;
+
+	std::cout << "\nChecking find on string \"" ;
 	a = "This is the string we are searching through";
 	std::cout << a << "\"\n";
 
@@ -126,10 +127,12 @@
 	std::cout << "Position of \"q\": ";
 	std::cout << a.find("q") << " - should be " << a.npos << std::endl;
 
-	std::cout << "\nChecking rfind on string \"" << std::endl;
+
+	std::cout << "\nChecking rfind on string \"";
 	a = "This is the string we are searching through";
 	std::cout << a << "\"\n";
 
+	std::cout << "Position of \"the\": ";
 	b = "the";
 	std::cout << a.rfind(b) << " = should be 8\n";
 
@@ -145,6 +148,33 @@
 	std::cout << "Position of \"q\": ";
 	std::cout << a.rfind("q") << " - should be " << a.npos << std::endl;
 
+	std::cout << "Position of \"This\": ";
+	std::cout << a.rfind("This") << " - should be 0\n";
+
+
+	std::cout << "\nChecking find_first_of on string \"";
+	a = "This is the string we are searching through";
+	std::cout << a << "\"\n";
+
+	std::cout << "Position of \"the\": ";
+	b = "the";
+	std::cout << a.find_first_of(b) << " = should be 1\n";
+
+	std::cout << "Position of \'g\': ";
+	std::cout << a.find_first_of('g') << " - should be 17\n";
+
+	std::cout << "Position of \"search\": ";
+	std::cout << a.find_first_of("search") << " - should be 1\n";
+
+	std::cout << "Position of \"is\" starting at character 4: ";
+	std::cout << a.find_first_of("is", 5) << " - should be 5\n";
+
+	std::cout << "Position of \"q\": ";
+	std::cout << a.find_first_of("q") << " - should be " << a.npos << std::endl;
+
+	std::cout << "Position of \"This\": ";
+	std::cout << a.find_first_of("This") << " - should be 0\n";
+
 	
 
 	return 0;



More information about the uClibc-cvs mailing list