]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/test/tree/test_case_counter.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / test / tree / test_case_counter.hpp
index a74f37f152e93ae0c8acae552ce6310b96834aa3..2d9b3bdddc3598a79555c33226058eb765d8644e 100644 (file)
@@ -34,13 +34,19 @@ namespace unit_test {
 class test_case_counter : public test_tree_visitor {
 public:
     // Constructor
-    test_case_counter() : p_count( 0 ) {}
+    // @param ignore_disabled ignore the status when counting
+    test_case_counter(bool ignore_status = false)
+    : p_count( 0 )
+    , m_ignore_status(ignore_status)
+    {}
 
     BOOST_READONLY_PROPERTY( counter_t, (test_case_counter)) p_count;
 private:
     // test tree visitor interface
-    virtual void    visit( test_case const& tc )                { if( tc.is_enabled() ) ++p_count.value; }
-    virtual bool    test_suite_start( test_suite const& ts )    { return ts.is_enabled(); }
+    virtual void    visit( test_case const& tc )                { if( m_ignore_status || tc.is_enabled() ) ++p_count.value; }
+    virtual bool    test_suite_start( test_suite const& ts )    { return m_ignore_status || ts.is_enabled(); }
+  
+    bool m_ignore_status;
 };
 
 } // namespace unit_test