27 #include "boost/static_assert.hpp" 48 copy(pairs.
begin(), pairs.
end(), ostream_iterator<OrderedPair>(*
os_,
" "));
79 vector<OrderedPair> v;
80 copy(pairs.
begin(), pairs.
end(), back_inserter(v));
93 if (
os_) *
os_ <<
"testArray()\n";
94 double a[] = {1, 2, 3, 4, 5, 6};
102 if (
os_) *
os_ <<
"testVectorDouble()\n";
104 for (
int i=1; i<=6; i++) v.push_back(i);
111 if (
os_) *
os_ <<
"testVectorOrderedPair()\n";
112 vector<OrderedPair> v;
120 #pragma pack(push, 1) 127 if (
os_) *
os_ <<
"testVectorCustomPair()\n";
128 vector<CustomPair> v;
138 if (
os_) *
os_ <<
"testEquality()\n";
139 vector<OrderedPair> v;
144 vector<OrderedPair> w = v;
151 v.back().y = w.back().y;
158 vector<OrderedPair> v;
159 istringstream iss(
"(420,666) (421,667)");
160 copy(istream_iterator<OrderedPair>(iss), istream_iterator<OrderedPair>(), back_inserter(v));
180 int main(
int argc,
char* argv[])
186 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
void testVectorOrderedPair()
void testVectorCustomPair()
int main(int argc, char *argv[])
const_iterator end() const
BOOST_STATIC_ASSERT(sizeof(unsigned int)==4)
CustomPair(double _a, double _b)
#define TEST_PROLOG(argc, argv)
KernelTraitsBase< Kernel >::space_type::abscissa_type x
KernelTraitsBase< Kernel >::space_type::ordinate_type y
wrapper class for accessing contiguous data as a container of OrderedPairs; note that it does not own...
const_iterator begin() const
void testContainer(const OrderedPairContainerRef &pairs)