aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-10-20 16:56:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-10-20 16:56:25 +0200
commit6ba682b661fb698e6d8af61e44d527aed0922b1d (patch)
treec331ecaf915a9d39e2cd789ce754c6953661d08c
parentb135374d5e40df21871b3e0c9efc69ba2d8361cb (diff)
Make the test architecture width-independent
-rw-r--r--tests/cxx/hashmap/driver.cxx6
-rw-r--r--tests/cxx/hashmap/makefile4
-rw-r--r--tests/cxx/hashmap/test-000.std9
3 files changed, 7 insertions, 12 deletions
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<const char* const*> (p) << "'" << endl;
+ n += *static_cast<const char* const*> (p) [0];
}
+
+ assert (n == '1' + '2' + '3' + '4' + '5' + '6' + '7' + '8' + '9');
}
}
diff --git a/tests/cxx/hashmap/makefile b/tests/cxx/hashmap/makefile
index 0438876..6ccbd82 100644
--- a/tests/cxx/hashmap/makefile
+++ b/tests/cxx/hashmap/makefile
@@ -36,8 +36,8 @@ $(out_base)/: $(driver)
# Test.
#
$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test-000.std
- $(call message,test $$1,$$1 | diff -u $(src_base)/test-000.std -,$(driver))
+$(test): $(driver)
+ $(call message,test $$1,$$1,$(driver))
# Dist.
diff --git a/tests/cxx/hashmap/test-000.std b/tests/cxx/hashmap/test-000.std
deleted file mode 100644
index 295e6da..0000000
--- a/tests/cxx/hashmap/test-000.std
+++ /dev/null
@@ -1,9 +0,0 @@
-'1'
-'4'
-'2'
-'9'
-'3'
-'8'
-'5'
-'6'
-'7'