|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72831 - sandbox/bloom_filter/trunk/libs/bloom_filter/test
From: cpp.cabrera_at_[hidden]
Date: 2011-07-01 00:20:29
Author: alejandro
Date: 2011-07-01 00:20:23 EDT (Fri, 01 Jul 2011)
New Revision: 72831
URL: http://svn.boost.org/trac/boost/changeset/72831
Log:
Updated Jamfile to include new fail suite. Added failure tests for dynamic_bloom.
Added:
sandbox/bloom_filter/trunk/libs/bloom_filter/test/dynamic_bloom_intersect-fail.cpp (contents, props changed)
sandbox/bloom_filter/trunk/libs/bloom_filter/test/dynamic_bloom_union-fail.cpp (contents, props changed)
Text files modified:
sandbox/bloom_filter/trunk/libs/bloom_filter/test/Jamfile.v2 | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
Modified: sandbox/bloom_filter/trunk/libs/bloom_filter/test/Jamfile.v2
==============================================================================
--- sandbox/bloom_filter/trunk/libs/bloom_filter/test/Jamfile.v2 (original)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/test/Jamfile.v2 2011-07-01 00:20:23 EDT (Fri, 01 Jul 2011)
@@ -20,8 +20,14 @@
<warnings>all
;
- test-suite "basic"
+ test-suite "regression"
:
- [ run regression.cpp ]
+ [ run bloom-pass.cpp ]
+ [ run dynamic_bloom-pass.cpp ]
;
+ test-suite "fail"
+ :
+ [ run-fail dynamic_bloom_union-fail.cpp ]
+ [ run-fail dynamic_bloom_intersect-fail.cpp ]
+ ;
Added: sandbox/bloom_filter/trunk/libs/bloom_filter/test/dynamic_bloom_intersect-fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/test/dynamic_bloom_intersect-fail.cpp 2011-07-01 00:20:23 EDT (Fri, 01 Jul 2011)
@@ -0,0 +1,29 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Alejandro Cabrera 2011.
+// Distributed under the Boost
+// Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or
+// copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/bloom_filter for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#define BOOST_TEST_DYN_LINK 1
+#define BOOST_TEST_MODULE "Boost Bloom Filter" 1
+
+#include <boost/bloom_filter/dynamic_bloom.hpp>
+#include <boost/test/unit_test.hpp>
+
+using boost::bloom_filter::dynamic_bloom_filter;
+using boost::bloom_filter::boost_hash;
+
+BOOST_AUTO_TEST_CASE(testIntersectFailDifferentSize) {
+ dynamic_bloom_filter<size_t> bloom_1(300);
+ dynamic_bloom_filter<size_t> bloom_2(299);
+ dynamic_bloom_filter<size_t> bloom_union(300);
+
+ bloom_union = bloom_1 & bloom_2;
+}
+
Added: sandbox/bloom_filter/trunk/libs/bloom_filter/test/dynamic_bloom_union-fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/bloom_filter/trunk/libs/bloom_filter/test/dynamic_bloom_union-fail.cpp 2011-07-01 00:20:23 EDT (Fri, 01 Jul 2011)
@@ -0,0 +1,29 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Alejandro Cabrera 2011.
+// Distributed under the Boost
+// Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or
+// copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/bloom_filter for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#define BOOST_TEST_DYN_LINK 1
+#define BOOST_TEST_MODULE "Boost Bloom Filter" 1
+
+#include <boost/bloom_filter/dynamic_bloom.hpp>
+#include <boost/test/unit_test.hpp>
+
+using boost::bloom_filter::dynamic_bloom_filter;
+using boost::bloom_filter::boost_hash;
+
+BOOST_AUTO_TEST_CASE(testUnionFailDifferentSize) {
+ dynamic_bloom_filter<size_t> bloom_1(300);
+ dynamic_bloom_filter<size_t> bloom_2(299);
+ dynamic_bloom_filter<size_t> bloom_union(300);
+
+ bloom_union = bloom_1 | bloom_2;
+}
+
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