More boost-ified, now uses test tools.

[SVN r18113]
This commit is contained in:
Ronald Garcia 2003-03-27 20:28:29 +00:00
parent fad36ccacd
commit c05ce3ff59

View File

@ -7,25 +7,8 @@
#include <iostream> #include <iostream>
using namespace std; using namespace std;
template <typename Array>
void print(std::ostream& os, const Array& A)
{
typename Array::const_iterator i;
os << "[";
for (i = A.begin(); i != A.end(); ++i) {
print(os, *i);
if (boost::next(i) != A.end())
os << ',';
}
os << "]";
}
void print(std::ostream& os, const int& x) int test_main(int,char*[]) {
{
os << x;
}
int main() {
typedef boost::multi_array<int,3> marray; typedef boost::multi_array<int,3> marray;
@ -74,4 +57,5 @@ int main() {
BOOST_TEST(std::accumulate(defaultA.data(), BOOST_TEST(std::accumulate(defaultA.data(),
defaultA.data()+(2*3*4),0) == 0); defaultA.data()+(2*3*4),0) == 0);
} }
return boost::exit_success;
} }