[uClibc-cvs] CVS uClibc++/tests

CVS User gkajmowi gkajmowi at codepoet.org
Thu Jan 6 18:03:09 UTC 2005


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

Modified Files:
	listtest.cpp maptest.cpp 
Log Message:
Miscellaneous changes to list, map, utility as well as the test suite.

--- /var/cvs/uClibc++/tests/listtest.cpp	2004/12/23 16:06:46	1.5
+++ /var/cvs/uClibc++/tests/listtest.cpp	2005/01/06 18:03:06	1.6
@@ -307,6 +307,35 @@
 	std::cout << std::endl;
 	
 
+	std::cout << "Testing operator=()\n";
+	temp.clear();
+	temp.push_back(12.8);
+	temp.push_back(22.4);
+	temp.push_back(37.9);
+	temp.push_back(48.5);
+	temp.push_back(21.2);
+	temp.push_back(85.4);
+	temp.push_back(24.6);
+	temp.push_back(69.7);
+
+	std::cout << "The following three lines should be identical\n";
+	std::cout << "12.8 22.4 37.9 48.5 21.2 85.4 24.6 69.7 \n";
+	a = temp;	
+	i = temp.begin();
+	while(i != temp.end()){
+		std::cout << *i << " ";
+		++i;
+	}
+	std::cout << std::endl;
+
+	i = a.begin();
+	while(i != a.end()){
+		std::cout << *i << " ";
+		++i;
+	}
+	std::cout << std::endl;
+
+
 
 	std::cout << "\nTesting sorting\n";
 
--- /var/cvs/uClibc++/tests/maptest.cpp	2004/12/23 16:06:46	1.5
+++ /var/cvs/uClibc++/tests/maptest.cpp	2005/01/06 18:03:06	1.6
@@ -16,6 +16,8 @@
 	std::map<std::string, double>::iterator i, j;
 	std::map<std::string, double>::const_iterator k;
 
+	std::map<std::string, double>::reverse_iterator ri;
+
 	std::cout << "Start of map test" << std::endl;
 
 	std::cout << "Adding a few elements..." << std::endl;
@@ -56,6 +58,16 @@
 		i++;
 	}
 
+	std::cout << "Elements in reverse order:\n";
+	ri = test.rbegin();
+	while(ri != test.rend()){
+//		std::cout << ri->first << ": " << ri->second << std::endl;
+		std::cout << (*ri).first << ": " << (*ri).second << std::endl;
+		++ri;
+	}
+
+
+
 	std::cout << "Number of elements: " << test.size() << std::endl;
 	std::cout << "Container empty? " << test.empty() << std::endl;
 



More information about the uClibc-cvs mailing list