Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Class test_results

Boost , Boost.Test , Header <boost/test/results_collector.hpp>

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Class test_results

boost::unit_test::test_results — Collection of attributes constituting test unit results.

Synopsis

// In header: <boost/test/results_collector.hpp>

class test_results {
public:
  // construct/copy/destruct
  test_results();
  // public member functions
  typedef BOOST_READONLY_PROPERTY(counter_t, 
                                  (results_collector_t)(test_results)(results_collect_helper));
  typedef BOOST_READONLY_PROPERTY(bool, 
                                  (results_collector_t)(test_results)(results_collect_helper));
  bool passed() const;
  int result_code() const;
  void operator+=(test_results const &);
  void clear();
  // public data members
  counter_prop p_assertions_passed;  // Number of successful assertions. 
  counter_prop p_assertions_failed;  // Number of failing assertions. 
  counter_prop p_warnings_failed;  // Number of warnings. 
  counter_prop p_expected_failures;
  counter_prop p_test_cases_passed;  // Number of successfull test cases. 
  counter_prop p_test_cases_warned;  // Number of warnings in test cases. 
  counter_prop p_test_cases_failed;  // Number of failing test cases. 
  counter_prop p_test_cases_skipped;  // Number of skipped test cases. 
  counter_prop p_test_cases_aborted;  // Number of aborted test cases. 
  counter_prop p_duration_microseconds;  // Duration of the test in microseconds. 
  bool_prop p_aborted;  // Indicates that the test unit execution has been aborted. 
  bool_prop p_skipped;  // Indicates that the test unit execution has been skipped. 
};

Description

Этот класс представляет собой набор атрибутов, описывающих результат теста.

Атрибуты представлены как общественные свойства на примере класса. Кроме того, представлены методы краткого заключения, чтобы получить простой ответ на вопрос прохода/выхода

test_results public construct/copy/destruct

  1. test_results();

test_results public member functions

  1. typedef BOOST_READONLY_PROPERTY(counter_t, 
                                    (results_collector_t)(test_results)(results_collect_helper));
    Type representing counter like public property.
  2. typedef BOOST_READONLY_PROPERTY(bool, 
                                    (results_collector_t)(test_results)(results_collect_helper));
    Type representing boolean like public property.
  3. bool passed() const;
    Returns true if test unit passed.
  4. int result_code() const;
    Produces result code for the test unit execution.

    This methhod return one of the result codes defined in boost/cstdlib.hpp

    Returns:

    • boost::exit_success on success,

    • boost::exit_ exception_failure в случае, если испытательное устройство было прервано по какой-либо причине (заявляя неустановленное исключение)

    • и boost::exit_test_failure в противном случае

  5. void operator+=(test_results const &);
    Combines the results of the current instance with another.

    Only the counters are updated and the p_aborted and p_skipped are left unchanged.

  6. void clear();
    Resets the current state of the result.

PrevUpHomeNext

Статья Class test_results раздела Boost.Test Header <boost/test/results_collector.hpp> может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Header <boost/test/results_collector.hpp> ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-07-04 21:24:29/0.0083670616149902/1