Commit eed46d58 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add test debug.cc

parent ff6e74ba
......@@ -37,3 +37,4 @@ ENDMACRO(DEFINE_TEST)
DEFINE_TEST(simple-test hpp-util)
DEFINE_TEST(assertion hpp-util)
DEFINE_TEST(exception hpp-util)
DEFINE_TEST(debug hpp-util)
// Copyright (c) 2016, Joseph Mirabel
// Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
//
// This file is part of hpp-util.
// hpp-util is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version
// 3 of the License, or (at your option) any later version.
//
// hpp-util is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// hpp-util. If not, see <http://www.gnu.org/licenses/>.
// Copyright (C) 2009 by Florent Lamiraux.
//
// This file is part of the hpp-util.
//
// hpp-util is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// hpp-util is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with hpp-util. If not, see <http://www.gnu.org/licenses/>.
#include "config.h"
#include <iostream>
#include <boost/assign/list_of.hpp>
#include <hpp/util/debug.hh>
#include "common.hh"
using namespace hpp::debug;
int run_test ()
{
JournalOutput out ("debug.test.log");
Channel channel ("TEST", boost::assign::list_of<Output*> (&out));
for (int i = 0; i < 100000; ++i) {
std::stringstream ss;
ss << i << hpp::iendl;
out.write (channel, __FILE__, __LINE__, __PRETTY_FUNCTION__, ss.str());
}
return 0;
}
GENERATE_TEST ()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment