DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
// (C) Copyright Gennadiy Rozental 2001-2007. // 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/test for the library home page. // // File : $RCSfile$ // // Version : $Revision: 41369 $ // // Description : generators and helper macros for parameterized tests // *************************************************************************** #ifndef BOOST_TEST_PARAMETERIZED_TEST_HPP_021102GER #define BOOST_TEST_PARAMETERIZED_TEST_HPP_021102GER // Boost.Test #include
#include
// Boost #include
#include
#include
//____________________________________________________________________________// #define BOOST_PARAM_TEST_CASE( function, begin, end ) \ boost::unit_test::make_test_case( function, \ BOOST_TEST_STRINGIZE( function ), \ (begin), (end) ) \ /**/ #define BOOST_PARAM_CLASS_TEST_CASE( function, tc_instance, begin, end ) \ boost::unit_test::make_test_case( function, \ BOOST_TEST_STRINGIZE( function ), \ (tc_instance), \ (begin), (end) ) \ /**/ namespace boost { namespace unit_test { // ************************************************************************** // // ************** test_func_with_bound_param ************** // // ************************************************************************** // namespace ut_detail { template
struct test_func_with_bound_param { template
test_func_with_bound_param( callback1
test_func, T const& param ) : m_test_func( test_func ) , m_param( param ) {} void operator()() { m_test_func( m_param ); } private: callback1
m_test_func; ParamType m_param; }; // ************************************************************************** // // ************** param_test_case_generator ************** // // ************************************************************************** // template
class param_test_case_generator : public test_unit_generator { public: param_test_case_generator( callback1
const& test_func, const_string tc_name, ParamIter par_begin, ParamIter par_end ) : m_test_func( test_func ) , m_tc_name( ut_detail::normalize_test_case_name( tc_name ) ) , m_par_begin( par_begin ) , m_par_end( par_end ) {} test_unit* next() const { if( m_par_begin == m_par_end ) return (test_unit*)0; test_func_with_bound_param
bound_test_func( m_test_func, *m_par_begin ); test_unit* res = new test_case( m_tc_name, bound_test_func ); ++m_par_begin; return res; } private: // Data members callback1
m_test_func; std::string m_tc_name; mutable ParamIter m_par_begin; ParamIter m_par_end; }; //____________________________________________________________________________// template
struct user_param_tc_method_invoker { typedef void (UserTestCase::*test_method)( ParamType ); // Constructor user_param_tc_method_invoker( shared_ptr
inst, test_method test_method ) : m_inst( inst ), m_test_method( test_method ) {} void operator()( ParamType p ) { ((*m_inst).*m_test_method)( p ); } // Data members shared_ptr
m_inst; test_method m_test_method; }; //____________________________________________________________________________// } // namespace ut_detail template
inline ut_detail::param_test_case_generator
make_test_case( callback1
const& test_func, const_string tc_name, ParamIter par_begin, ParamIter par_end ) { return ut_detail::param_test_case_generator
( test_func, tc_name, par_begin, par_end ); } //____________________________________________________________________________// template
inline ut_detail::param_test_case_generator< BOOST_DEDUCED_TYPENAME remove_const
::type>::type,ParamIter> make_test_case( void (*test_func)( ParamType ), const_string tc_name, ParamIter par_begin, ParamIter par_end ) { typedef BOOST_DEDUCED_TYPENAME remove_const
::type>::type param_value_type; return ut_detail::param_test_case_generator
( test_func, tc_name, par_begin, par_end ); } //____________________________________________________________________________// template
inline ut_detail::param_test_case_generator< BOOST_DEDUCED_TYPENAME remove_const
::type>::type,ParamIter> make_test_case( void (UserTestCase::*test_method )( ParamType ), const_string tc_name, boost::shared_ptr
const& user_test_case, ParamIter par_begin, ParamIter par_end ) { typedef BOOST_DEDUCED_TYPENAME remove_const
::type>::type param_value_type; return ut_detail::param_test_case_generator
( ut_detail::user_param_tc_method_invoker
( user_test_case, test_method ), tc_name, par_begin, par_end ); } //____________________________________________________________________________// } // unit_test } // namespace boost //____________________________________________________________________________// #include
#endif // BOOST_TEST_PARAMETERIZED_TEST_HPP_021102GER
parameterized_test.hpp
Page URL
File URL
Prev
13/28
Next
Download
( 6 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.