text
stringlengths
0
2.2M
}
bool call_approve(const Role& r, const Expense& e, double a) {
return approve(r, e, a);
}
// bdlmt_threadmultiplexor.t.cpp -*-C++-*-
// ----------------------------------------------------------------------------
// NOTICE
//
// This component is not up to date with current BDE coding standards, and
// should not be used as an example for new development.
// ----------------------------------------------------------------------------
#include <bdlmt_threadmultiplexor.h>
#include <bslim_testutil.h>
#include <bdlf_bind.h>
#include <bslmt_semaphore.h>
#include <bslmt_threadutil.h>
#include <bslmt_threadgroup.h>
#include <bdlmt_fixedthreadpool.h>
#include <bsls_atomic.h>
#include <bslma_managedptr.h>
#include <bslma_testallocator.h>
#include <bsl_algorithm.h>
#include <bsl_cstdlib.h>
#include <bsl_functional.h>
#include <bsl_iostream.h>
#include <bsl_streambuf.h>
#include <bsl_c_math.h>
using namespace BloombergLP;
using bsl::cout;
using bsl::cerr;
using bsl::endl;
using bsl::flush;
// ============================================================================
// TEST PLAN
// ----------------------------------------------------------------------------
// Overview
// --------
// TBD: Overview
// ----------------------------------------------------------------------------
// CREATORS
// [ 1] bdlmt::ThreadMultiplexor(int, int, bslma::Allocator *);
// [ 1] ~bdlmt::ThreadMultiplexor();
//
// MANIPULATORS
// [ 2] int processJob(const JOBTYPE&);
//
// ACCESSORS
// [ 1] int maxProcessors();
// [ 1] int numProcessors();
// ----------------------------------------------------------------------------
// [ 1] BREATHING TEST
// [ 2] USAGE EXAMPLE
// [ 3] MORE PARTITIONS
// [ 4] SMALL QUEUE
// [ 5] STRESS TEST
// [ 6] CONCERN: Single-processor multiplexor
// ----------------------------------------------------------------------------
// ============================================================================
// STANDARD BDE ASSERT TEST FUNCTION
// ----------------------------------------------------------------------------
namespace {
int testStatus = 0;
void aSsErT(bool condition, const char *message, int line)
{
if (condition) {
cout << "Error " __FILE__ "(" << line << "): " << message
<< " (failed)" << endl;
if (0 <= testStatus && testStatus <= 100) {
++testStatus;
}
}
}
} // close unnamed namespace
// ============================================================================
// STANDARD BDE TEST DRIVER MACRO ABBREVIATIONS
// ----------------------------------------------------------------------------
#define ASSERT BSLIM_TESTUTIL_ASSERT
#define ASSERTV BSLIM_TESTUTIL_ASSERTV