compiler_log_formatter.hpp 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // (C) Copyright Gennadiy Rozental 2005-2008.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/test for the library home page.
  6. //
  7. // File : $RCSfile$
  8. //
  9. // Version : $Revision: 57992 $
  10. //
  11. // Description : contains compiler like Log formatter definition
  12. // ***************************************************************************
  13. #ifndef BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
  14. #define BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
  15. // Boost.Test
  16. #include <boost/test/detail/global_typedef.hpp>
  17. #include <boost/test/unit_test_log_formatter.hpp>
  18. #include <boost/test/detail/suppress_warnings.hpp>
  19. //____________________________________________________________________________//
  20. namespace boost {
  21. namespace unit_test {
  22. namespace output {
  23. // ************************************************************************** //
  24. // ************** compiler_log_formatter ************** //
  25. // ************************************************************************** //
  26. class BOOST_TEST_DECL compiler_log_formatter : public unit_test_log_formatter {
  27. public:
  28. // Formatter interface
  29. void log_start( std::ostream&, counter_t test_cases_amount );
  30. void log_finish( std::ostream& );
  31. void log_build_info( std::ostream& );
  32. void test_unit_start( std::ostream&, test_unit const& tu );
  33. void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed );
  34. void test_unit_skipped( std::ostream&, test_unit const& tu );
  35. void log_exception( std::ostream&, log_checkpoint_data const&, execution_exception const& ex );
  36. void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let );
  37. void log_entry_value( std::ostream&, const_string value );
  38. void log_entry_value( std::ostream&, lazy_ostream const& value );
  39. void log_entry_finish( std::ostream& );
  40. protected:
  41. virtual void print_prefix( std::ostream&, const_string file, std::size_t line );
  42. };
  43. } // namespace output
  44. } // namespace unit_test
  45. } // namespace boost
  46. //____________________________________________________________________________//
  47. #include <boost/test/detail/enable_warnings.hpp>
  48. #endif // BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER