Commit Graph

291 Commits

Author SHA1 Message Date
Daniel James
a039550901 Don't test long double in hash_number_test. This is a bit of a cop out, but it's silly to fail this test just because a platform has poor support for long double - hash_long_double_test is thorough enough.
[SVN r40233]
2007-10-21 00:41:01 +00:00
Daniel James
37ba531408 Merge some minor changes from the development branch to remove some unnecessary differences.
[SVN r40131]
2007-10-17 17:29:46 +00:00
Daniel James
5ded14acd4 Remove the free-function-groups from the hash reference documentation, they were causing the functions to be listed on the documentation for every specialization of boost::hash<T>, and the functions to be described on the main synopsis page, instead of their own page.
[SVN r40101]
2007-10-16 23:25:37 +00:00
Daniel James
2196f0ea17 Avoid some warnings when compiling the test with Visual C++.
[SVN r40004]
2007-10-14 07:38:49 +00:00
Daniel James
76fc46ae69 Add a trivial test to see if the deprecated hash headers compile okay when included.
[SVN r39994]
2007-10-13 22:43:13 +00:00
Daniel James
6ee186bb94 Clean up the hash tests a little.
[SVN r39993]
2007-10-13 22:30:50 +00:00
Daniel James
29f14bcf66 Use quickbook v1.4 for the hash library.
[SVN r39985]
2007-10-13 18:47:41 +00:00
Daniel James
35d19e5111 Fix the copyright line for the hash library.
[SVN r39984]
2007-10-13 18:47:10 +00:00
Daniel James
2de9bfe88c Add support for complex numbers to Boost.Hash
[SVN r39983]
2007-10-13 18:34:25 +00:00
Daniel James
eff60d4911 Separate the long double hash tests from the test for other float types. On
some platforms the standard library has poor support for long doubles causing
long doubles to fail when the others pass. So this makes it clearer that the
problem is only for long doubles.


[SVN r39979]
2007-10-13 17:47:57 +00:00
Daniel James
02d0136be9 Remove the pointles separation of the float tests into three functions
(probably a throwback to when I used Boost.Test)


[SVN r39977]
2007-10-13 17:35:48 +00:00
Daniel James
782dc36a8a Output some info about a test failure when hashing function pointers.
[SVN r39833]
2007-10-09 07:19:30 +00:00
Daniel James
22a7fdfdc4 Include the size of function pointers, void* and std::size_t in the output of the function pointer hash test, to give me a clue why it's failling on a platform.
[SVN r39766]
2007-10-07 18:08:35 +00:00
Daniel James
ce7a9c057b Fix an if statement.
[SVN r39692]
2007-10-05 09:43:01 +00:00
Daniel James
fe5fa48972 Add proper support for long longs and unsigned long longs.
[SVN r39014]
2007-08-27 18:16:54 +00:00
Daniel James
59bc46847c Comment out -Wextra because it doesn't work on older versions of gcc.
[SVN r39009]
2007-08-27 17:59:54 +00:00
Daniel James
6534cfbf37 Remove hash_complex_test - it should have been removed when I reverted to 1.34.1
[SVN r38884]
2007-08-24 02:33:43 +00:00
Daniel James
75e994b306 Add some missing hash_value documentation for the new overloads.
[SVN r38882]
2007-08-24 01:56:47 +00:00
Daniel James
93b80b365f Add extra overloads for hash_value to cover all the specializations of boost::hash. Fixes 1095
[SVN r38881]
2007-08-24 01:44:15 +00:00
Daniel James
c388716534 Merge some documentation improvements from the development branch.
[SVN r38878]
2007-08-24 01:16:54 +00:00
Daniel James
5f90cf05d3 Update the copyright in the hash library.
[SVN r38876]
2007-08-24 01:05:36 +00:00
Daniel James
ff43cf2784 Copy hash library from 1.34.1 over trunk.
For the first merge with the release branch, I only want to include some of the
changes I've been working on (fixes and some trivial changes), so I'm starting
again from 1.34.1.


[SVN r38873]
2007-08-24 00:42:19 +00:00
Daniel James
08d38c1e39 Avoid a comparison with zero warning on gcc when compiling with -Wextra.
[SVN r38679]
2007-08-15 14:35:39 +00:00
Daniel James
eb49a19b98 Test the hash library with warning level 4 on Visual C++ - although there's
still one warning for hashing long doubles.


[SVN r38647]
2007-08-14 09:53:55 +00:00
nobody
bb774728a0 Add -Wsign-promo to the hash test compile flags since I'm now trying to avoid the warning. I still need to check that it won't break older versions of gcc.
[SVN r38565]
2007-08-10 11:22:54 +00:00
nobody
6753d4b507 Add overloads of hash_value for more built in types. They're not strictly
needed and aren't in the original specifiction but they avoid a warning. See
ticket #1095 for details.


[SVN r38563]
2007-08-10 10:32:21 +00:00
Daniel James
d8807048a6 Drop the v1 Jamfiles.
[SVN r38512]
2007-08-08 18:26:51 +00:00
Daniel James
5533eb6acf Update the copyright in more hash files.
[SVN r37802]
2007-05-27 09:09:28 +00:00
Daniel James
7e023df182 Another typo.
[SVN r37569]
2007-05-02 21:44:56 +00:00
Daniel James
e9a36b1d8e Fix a typo.
[SVN r37568]
2007-05-02 21:43:51 +00:00
Daniel James
03f0279b8f Group the functions in the hash reference to make it a little clearer.
[SVN r37567]
2007-05-02 21:39:13 +00:00
Daniel James
2b15ff8132 Add missing bracket.
[SVN r37541]
2007-04-30 20:28:04 +00:00
Daniel James
de290be4ca Update the copyright in the hash documentation.
[SVN r37518]
2007-04-27 19:46:53 +00:00
Daniel James
0ff4d2e602 Add reference documentation for boost::hash<T*>
[SVN r37517]
2007-04-27 19:44:18 +00:00
Daniel James
b5c1943ce9 Merge in the intel gcc workaround from RC_1_34_0.
[SVN r37428]
2007-04-12 20:37:27 +00:00
Daniel James
39f3b56b99 Remove an unrequired semi-colon.
[SVN r37427]
2007-04-12 20:34:59 +00:00
Dave Abrahams
d14013264c Correct testing bugs:
either changing assert(...) or BOOST_ASSERT(...) to BOOST_TEST
    (in my code only)

    or adding "return boost::report_errors();" where it was clearly
    missing (and a pure bug, in anyone's code).


[SVN r37057]
2007-02-24 22:40:59 +00:00
Daniel James
585813f9fe Rename hash_detail::float_limits => hash_detail::limits, since it's also used
for integers in the tests.


[SVN r35559]
2006-10-11 18:58:40 +00:00
Daniel James
c7778306f8 Use boost::hash_detail::float_limits in hash_number_test. This works around
OpenBSD's inaccurate numeric_limits<long double>.


[SVN r35558]
2006-10-11 18:50:59 +00:00
Daniel James
26473491c4 Attempting to work round the dodgy std::numeric_limits<long double> on
some BSDs.


[SVN r35345]
2006-09-26 20:35:58 +00:00
Daniel James
087c6c30b1 Fixed the use of a deprecated header in a test.
[SVN r35313]
2006-09-24 19:57:34 +00:00
Daniel James
519cd177dd Add copyright comments to the hash documentation source.
[SVN r35288]
2006-09-23 14:48:19 +00:00
Daniel James
7f00e9edf6 Add copyright to the hash redirection page.
[SVN r34549]
2006-07-16 07:13:50 +00:00
Daniel James
645cac6ae3 Update copyright details.
[SVN r34390]
2006-06-25 09:59:05 +00:00
Daniel James
f5dfe1b7e1 Add reference for boost::hash_value<std::complex>.
[SVN r34209]
2006-06-06 21:03:03 +00:00
Daniel James
f0a4785711 Add a test for hashing complex numbers.
[SVN r34208]
2006-06-06 20:52:28 +00:00
Daniel James
3efe8b9b1c Oops, get the test for long long working.
[SVN r34206]
2006-06-06 20:48:01 +00:00
Daniel James
b395d18d32 Document support for long long.
[SVN r34204]
2006-06-06 20:26:25 +00:00
Daniel James
5c525b6e4f Add tests for long long to the numeric hash tests.
[SVN r34203]
2006-06-06 20:14:55 +00:00
Daniel James
1d61057ee9 Fix an embarassing typo.
[SVN r34192]
2006-06-06 08:20:04 +00:00
Daniel James
a7b6993fbe Name TR1 properly in the hash introduction.
[SVN r33608]
2006-04-09 09:57:47 +00:00
Daniel James
b3e33afa13 Fix typo in hash reference documentation and update links to more recent
versions of TR1 and the issue list.


[SVN r33607]
2006-04-09 09:46:46 +00:00
Daniel James
82eea878c9 Merge hash reference changes from release branch.
[SVN r33569]
2006-04-06 20:10:57 +00:00
Daniel James
f819324a15 Put the reference documentation overloads of 'hash_value' into a single page.
[SVN r33508]
2006-03-28 17:02:49 +00:00
Daniel James
da13263e12 Fix typo in the hash tutorial.
[SVN r33507]
2006-03-28 16:46:49 +00:00
Daniel James
bb782b5239 Update the copyright comments in the hash tests and documentation.
[SVN r33369]
2006-03-18 15:49:21 +00:00
Daniel James
48f007cc40 Improve the 'blurbs' in the hash documentation.
[SVN r33344]
2006-03-14 22:42:52 +00:00
Daniel James
8e49dd4dac Add a note about the BOOST_HASH_NO_EXTENSIONS macro, and fix some typos and
improve the markup in the hash documentation.


[SVN r33298]
2006-03-09 23:59:19 +00:00
Daniel James
4bd9ad6f4b Add a list of changes to the hash library documentation, update the
acknowledgements, and fix a few typos.


[SVN r33264]
2006-03-07 22:50:45 +00:00
Daniel James
8ff99666d5 Add the specializations of boost::hash to the reference documentation.
[SVN r33263]
2006-03-07 22:49:27 +00:00
Daniel James
9065912ab3 Use an array instead of std::set in hash_no_ext_fail_test, as that seems like a better test for older compilers.
[SVN r33194]
2006-03-01 22:44:27 +00:00
Daniel James
7a741bf44a Only check that hash functions for the different infinities are equal when the infinities are equal...
[SVN r33182]
2006-02-28 23:15:43 +00:00
Dave Abrahams
cc22df0753 Remove uses of assert() from tests
[SVN r33011]
2006-02-19 15:03:31 +00:00
Daniel James
be3a039e88 Split the hash documentation into several files.
[SVN r32973]
2006-02-16 23:10:26 +00:00
Daniel James
de07bf2d69 Add to the hash tests, tests for the BOOST_HASH_NO_EXTENSIONS macro and a few other updates.
[SVN r32901]
2006-02-13 18:26:00 +00:00
Daniel James
f2d6086180 Make hash_fwd_test_1 a little easier to compile.
[SVN r32834]
2006-02-11 21:20:47 +00:00
Daniel James
7aeaa0f669 Update the hash documentation to reflect the reorganisation of the headers (still need to write a 'what's changed' page to explain the changes).
[SVN r32800]
2006-02-10 00:26:09 +00:00
Daniel James
1f657699a2 Tweak the portable example.
[SVN r32787]
2006-02-09 19:24:04 +00:00
Daniel James
1ce3be5602 Add a couple of missing includes for hash_range_test and hash_string_test
[SVN r32785]
2006-02-09 19:20:07 +00:00
Daniel James
ef0b8e3188 Change the hash tests to use the lightweight test header.
[SVN r32784]
2006-02-09 19:16:08 +00:00
Daniel James
9734825574 Update the hash tests for the new headers.
[SVN r32779]
2006-02-09 19:01:33 +00:00
Daniel James
8f2c004a17 Add the missing test.
[SVN r32776]
2006-02-09 18:43:55 +00:00
Vladimir Prus
972f720922 Comment out refereces to absent file
[SVN r32772]
2006-02-09 14:12:19 +00:00
Daniel James
47df6bd0fe Update the portable example to hopefully be more generally portable.
Change hash_fwd_test to avoid a Borland bug, add 'hash_friend_test' to test for it.

Fix a typo in hash_fwd_test.


[SVN r32747]
2006-02-08 19:03:09 +00:00
Daniel James
bb702b827e In hash_fwd_test avoid a Borland bug by putting the test classes in a namespace.
Seems to break on gcc 2.95 though...

Also use HASH_NAMESPACE instead of boost to allow tests to be run in 'std'.


[SVN r32686]
2006-02-07 00:48:58 +00:00
Daniel James
3cb7963112 Add an extra test for a Borland bug I found.
[SVN r32685]
2006-02-07 00:45:32 +00:00
Daniel James
0eab9ed7bb In hash tests, stop using <boost/test/auto_unit_test.hpp> as it's deprecated.
[SVN r32595]
2006-02-05 19:54:08 +00:00
Daniel James
c8dc9ac3e4 Add tests for the hash forward header.
[SVN r32587]
2006-02-05 16:06:31 +00:00
Daniel James
7815a36643 Fix a parse error in the hash test Jamfile.
[SVN r32585]
2006-02-05 15:56:47 +00:00
Daniel James
f467da5438 Add pair to container_fwd_test.
[SVN r32582]
2006-02-05 14:11:59 +00:00
Daniel James
0742484087 Add copyright to container_fwd_test.
[SVN r32580]
2006-02-05 14:02:28 +00:00
Daniel James
6d33feebb7 Make the functions static in container_fwd_test.
[SVN r32579]
2006-02-05 14:00:23 +00:00
Daniel James
3bcc03eb7d Add a missing include to a functional/hash test header.
[SVN r32578]
2006-02-05 13:59:03 +00:00
Daniel James
a64d2ba248 Tidy up functional/hash's Jamfile a little.
[SVN r32577]
2006-02-05 13:58:06 +00:00
Daniel James
d3e29d33d0 Fix a build error in the hash tests.
[SVN r32060]
2005-12-15 18:00:47 +00:00
Daniel James
985edc9e9c Quick & dirty update of hash tests for new version of Boost.Test
[SVN r32056]
2005-12-15 00:27:53 +00:00
Daniel James
dd76eb37ed More epsilon hash float tests.
[SVN r32055]
2005-12-15 00:22:00 +00:00
Daniel James
efc6c13cd5 Fix clumsy mistakes in the epsilon hash test.
[SVN r31908]
2005-12-04 20:08:10 +00:00
Daniel James
f14a00699c Test for hashing 1+epsilon, following recent boost-dev comments on Darwin
gcc-4.0's long double.


[SVN r31907]
2005-12-04 20:02:08 +00:00
Daniel James
96916fefda Return 0 from test, for the benefit of Visual C++ 6.
[SVN r31202]
2005-10-05 20:52:00 +00:00
Daniel James
991164a3bb Add test for char_traits in container_fwd.hpp
[SVN r31134]
2005-09-27 19:46:04 +00:00
Daniel James
aa137615ec Add tests for container_fwd to hash tests.
[SVN r31044]
2005-09-19 20:39:57 +00:00
Daniel James
4f268b098f Merge in Markus' workaround for Tru64/CXX std::numeric_limits::denorm_min() bug
from RC_1_33_0.


[SVN r31042]
2005-09-19 18:25:30 +00:00
Daniel James
69a9aba270 Return 0 from int main() in the hash examples.
[SVN r30633]
2005-08-22 19:16:47 +00:00
Daniel James
59890d4588 Change the hash-test rule to work with multiple source files.
[SVN r30615]
2005-08-21 14:54:52 +00:00
Daniel James
2c7e98bec0 Add hash examples to the unit tests.
[SVN r30612]
2005-08-21 11:40:06 +00:00
Daniel James
abce4ebf57 Add Jamfiles for testing hash examples.
[SVN r30611]
2005-08-21 11:22:29 +00:00
Daniel James
d3c183186b Merge in fix to hash example/documentation from 1.33 branch.
[SVN r30610]
2005-08-20 20:44:23 +00:00
Daniel James
fcf0fb6ebb Revert a mistake in the previous commit of the hash documentation.
[SVN r30477]
2005-08-04 22:44:34 +00:00
Daniel James
0896ca794b Update hash links page to more recent versions of the papers.
[SVN r30476]
2005-08-04 22:39:41 +00:00
Daniel James
9353d3e783 Fix broken link in hash documentation source.
[SVN r30475]
2005-08-04 22:16:22 +00:00
Daniel James
d45e9a26f0 Fixed some of the include statements in the documentation.
[SVN r30464]
2005-08-04 17:39:42 +00:00
Daniel James
0c3a28a294 Add tests for linking two object files that include the hash libraries.
[SVN r29710]
2005-06-20 21:45:54 +00:00
Daniel James
1b1f076054 Fix a typo in hash_float_test.
[SVN r29120]
2005-05-21 17:15:10 +00:00
Daniel James
9afcdb022b Tweak the hash tests a bit more.
[SVN r29119]
2005-05-21 17:10:39 +00:00
Daniel James
c06e85147c Write a better error message when the denormalised minimum float hash test
fails.


[SVN r29118]
2005-05-21 16:46:53 +00:00
Daniel James
bfd5380e3c Try to make sure that the different functions in hash_function_pointer_test
really are different.


[SVN r28833]
2005-05-11 21:32:17 +00:00
Daniel James
097560f27b Try to fix the failing denorm_min hash_value test by explicitly casting the
result of denorm_min() (I think it might be returning the wrong type).


[SVN r28553]
2005-05-01 13:43:56 +00:00
Daniel James
1564e9c767 Change the description of functional/hash.
[SVN r28436]
2005-04-23 13:07:27 +00:00
Daniel James
a461b5b1c7 Add some links to the hash documentation, acknowledgements for the review,
fixed some errors.


[SVN r28427]
2005-04-22 22:08:49 +00:00
Daniel James
90b21239b4 Fix a clumsy mistake in hash_float_test
[SVN r28402]
2005-04-22 06:37:41 +00:00
Daniel James
65ece8bac0 Change hash_custom_test to have a cleaner implementation (along the lines of
Peter Dimov's suggestion) and to only include the hash headers after declaring
the class.


[SVN r28394]
2005-04-21 23:43:51 +00:00
Daniel James
b9f6765d15 Change hash_float_test to write out some false failures instead of failing.
[SVN r28393]
2005-04-21 23:41:12 +00:00
Daniel James
8dc87153e9 Split the hash pointer tests into tests for normal pointers and function pointers, as function pointers fail on old versions of Visual C++, and add a note about this to the hash documentaion.
[SVN r28389]
2005-04-21 22:18:38 +00:00
Daniel James
8da0e01046 Update hash documentation:
Rename to Boost.Functional/Hash. Add some extra details to the library header.
Use macros to link functions & classes.
Add a note about a couple of portability issues.


[SVN r28373]
2005-04-21 08:44:14 +00:00
Daniel James
c121440840 Various changes to the hash documentation including:
- Updated for splitting the books example into books.hpp & books.cpp
- Added the array overloads of hash_value, and the new signature for pointers.
- Split up the overloads of hash_value in boost/hash/hash.hpp.


[SVN r28341]
2005-04-20 15:16:29 +00:00
Daniel James
b2a365c644 Change the books hash example to have a separate header.
[SVN r28340]
2005-04-20 15:02:00 +00:00
Daniel James
ed5dd8be7e Add redirect for the hash documentation.
[SVN r28339]
2005-04-20 14:58:43 +00:00
Daniel James
469df369fd Change the NaN hash test to a warning.
[SVN r28318]
2005-04-18 17:16:02 +00:00
Daniel James
b4679091a2 Don't bother testing the hash functions with infinity and NaN on borland. Remove a few pointless lines from hash_value_array_test.
[SVN r28287]
2005-04-17 09:12:01 +00:00
Daniel James
1357e13c45 Add tests against Peter's spec.
[SVN r28281]
2005-04-16 16:56:27 +00:00
Daniel James
86d76f397d Add a test for hash_value called with an array. hash_value tests for other
types will be added to their normal tests.


[SVN r28275]
2005-04-16 10:31:20 +00:00
Daniel James
e9a52eb259 Remove the forced fail in the hash float tests on Borland, since the bug should now be fixed.
[SVN r28187]
2005-04-12 20:25:15 +00:00
Daniel James
a2cec1b71c Add some hash examples.
[SVN r28139]
2005-04-11 22:26:01 +00:00
Daniel James
ca202ee142 Make the float hash tests a tad bit more informative.
[SVN r28137]
2005-04-11 22:14:26 +00:00
Daniel James
2994fdf56c Add the hash documentation.
[SVN r28135]
2005-04-11 22:07:45 +00:00
Daniel James
8bebf347fa Remove the empty array hash function test.
[SVN r28088]
2005-04-10 19:21:38 +00:00
Daniel James
e5a62d1cf4 Drop the empty array test.
[SVN r28087]
2005-04-10 19:19:59 +00:00
Daniel James
02e120c774 Add the unit tests for hashing built in arrays.
[SVN r28079]
2005-04-10 12:38:58 +00:00
Daniel James
bc0f34d32d Use static assert instead of mpl assert in the hash tests, as it's more
portable.


[SVN r28068]
2005-04-09 09:30:27 +00:00
Daniel James
f102d684cf Implement the compile time checks for hash functions as a function instead of a templated class. Hopefully it will work on more compilers.
[SVN r28053]
2005-04-07 22:14:02 +00:00
Daniel James
2000b1aed8 Change tests so they can be used to test implementations of TR1 (maybe, eventually).
[SVN r28052]
2005-04-07 21:57:22 +00:00
Daniel James
37e2c9b8c4 Removes hash_range_test.cpp's dependency on Boost.Range, which isn't currently working on Borland.
[SVN r28050]
2005-04-07 21:07:14 +00:00
Daniel James
3cf2a5f88a Removes uses of BOOST_CHECK_EQUAL from the hash tests as they don't work on Borland.
Also force a failure on the float tests on borland as they are crashing horribly. Hopefully I should be able to fix this and remove this.

Also use pair's constructor in hash_map_test.hpp instead of make_pair so that the correct type is created.


[SVN r28049]
2005-04-07 20:53:20 +00:00
Daniel James
fcbbe94b41 Fix a bug in the float hash test - checking that infinity & -infinity hash to
the same value. The hash function is actually working better on the compilers
that were failing this test.


[SVN r28028]
2005-04-06 22:27:45 +00:00
Daniel James
22aa3748c0 Fix the 'DEPENDS all' line in the hash test Jamfile.
[SVN r27956]
2005-04-04 16:54:22 +00:00
Daniel James
4a62e1a35f Rename test suite to functional/hash
[SVN r27920]
2005-04-02 00:03:17 +00:00
Daniel James
1fbb7f83d2 Stop using Boost.Assign in tests as it currently doesn't work on all the compilers I want to support. A pity, but I was already making very limited use of it because of older compilers.
[SVN r27917]
2005-04-01 22:50:26 +00:00
Daniel James
5274643417 Stop using 'std::denorm_present' as on many compilers it isn't present itself.
[SVN r27916]
2005-04-01 22:49:19 +00:00
Daniel James
8c0b7d567e Fully specify custom's namespace for when the ADL workaround is used.
[SVN r27915]
2005-04-01 22:47:36 +00:00
Daniel James
1d60a30e0c Add the boost::hash unit tests.
[SVN r27903]
2005-04-01 16:58:09 +00:00