From 6ba682b661fb698e6d8af61e44d527aed0922b1d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 20 Oct 2009 16:56:25 +0200 Subject: Make the test architecture width-independent --- tests/cxx/hashmap/driver.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/cxx/hashmap/driver.cxx') diff --git a/tests/cxx/hashmap/driver.cxx b/tests/cxx/hashmap/driver.cxx index 99c773f..b8e2195 100644 --- a/tests/cxx/hashmap/driver.cxx +++ b/tests/cxx/hashmap/driver.cxx @@ -89,10 +89,14 @@ main () // Test iteration // + unsigned int n = 0; + for (hashmap::const_iterator i = h.begin (); i != h.end (); ++i) { const void* p = *i; - cout << "'" << *static_cast (p) << "'" << endl; + n += *static_cast (p) [0]; } + + assert (n == '1' + '2' + '3' + '4' + '5' + '6' + '7' + '8' + '9'); } } -- cgit v1.1