|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76328 - trunk/libs/uuid/test
From: atompkins_at_[hidden]
Date: 2012-01-05 22:40:27
Author: atompkins
Date: 2012-01-05 22:40:26 EST (Thu, 05 Jan 2012)
New Revision: 76328
URL: http://svn.boost.org/trac/boost/changeset/76328
Log:
added a test for ticket #5325
Text files modified:
trunk/libs/uuid/test/test_sha1.cpp | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
Modified: trunk/libs/uuid/test/test_sha1.cpp
==============================================================================
--- trunk/libs/uuid/test/test_sha1.cpp (original)
+++ trunk/libs/uuid/test/test_sha1.cpp 2012-01-05 22:40:26 EST (Thu, 05 Jan 2012)
@@ -263,6 +263,24 @@
}
}
+void test_long()
+{
+ // test 1 million 'a's
+
+ boost::uuids::detail::sha1 sha;
+ for (size_t i=0; i<1000000; i++) {
+ sha.process_byte('a');
+ }
+
+ unsigned int correct_digest[5] =
+ { 0x34aa973c, 0xd4c4daa4, 0xf61eeb2b, 0xdbad2731, 0x6534016f };
+
+ unsigned int digest[5];
+ sha.get_digest(digest);
+
+ BOOST_TEST_SHA1_DEGEST(digest, correct_digest);
+}
+
int main(int, char*[])
{
test_quick();
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk