|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76406 - branches/release/libs/uuid/test
From: atompkins_at_[hidden]
Date: 2012-01-10 23:14:18
Author: atompkins
Date: 2012-01-10 23:14:17 EST (Tue, 10 Jan 2012)
New Revision: 76406
URL: http://svn.boost.org/trac/boost/changeset/76406
Log:
ticket #5325
Text files modified:
branches/release/libs/uuid/test/test_sha1.cpp | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
Modified: branches/release/libs/uuid/test/test_sha1.cpp
==============================================================================
--- branches/release/libs/uuid/test/test_sha1.cpp (original)
+++ branches/release/libs/uuid/test/test_sha1.cpp 2012-01-10 23:14:17 EST (Tue, 10 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