Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_section.cpp
Go to the documentation of this file.
1
/*
2
* Created by Phil on 03/11/2010.
3
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
4
*
5
* Distributed under the Boost Software License, Version 1.0. (See accompanying
6
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
*/
8
9
#include "
catch_section.h
"
10
#include "
catch_capture.hpp
"
11
#include "
catch_uncaught_exceptions.h
"
12
13
namespace
Catch
{
14
15
Section::Section
(
SectionInfo
const
& info )
16
: m_info( info ),
17
m_sectionIncluded(
getResultCapture
().sectionStarted( m_info, m_assertions ) )
18
{
19
m_timer.
start
();
20
}
21
22
Section::~Section
() {
23
if
( m_sectionIncluded ) {
24
SectionEndInfo
endInfo{ m_info, m_assertions, m_timer.
getElapsedSeconds
() };
25
if
(
uncaught_exceptions
() )
26
getResultCapture
().
sectionEndedEarly
( endInfo );
27
else
28
getResultCapture
().
sectionEnded
( endInfo );
29
}
30
}
31
32
// This indicates whether the section should be executed or not
33
Section::operator bool()
const
{
34
return
m_sectionIncluded;
35
}
36
37
38
}
// end namespace Catch
catch_capture.hpp
catch_section.h
catch_uncaught_exceptions.h
Catch::Section::Section
Section(SectionInfo const &info)
Definition
catch_section.cpp:15
Catch::Section::~Section
~Section()
Definition
catch_section.cpp:22
Catch::Timer::getElapsedSeconds
auto getElapsedSeconds() const -> double
Definition
catch_timer.cpp:69
Catch::Timer::start
void start()
Definition
catch_timer.cpp:57
Catch
Definition
231-Cfg-OutputStreams.cpp:32
Catch::uncaught_exceptions
bool uncaught_exceptions()
Definition
catch_uncaught_exceptions.cpp:14
Catch::getResultCapture
IResultCapture & getResultCapture()
Definition
catch_run_context.cpp:494
Catch::IResultCapture::sectionEnded
virtual void sectionEnded(SectionEndInfo const &endInfo)=0
Catch::IResultCapture::sectionEndedEarly
virtual void sectionEndedEarly(SectionEndInfo const &endInfo)=0
Catch::SectionEndInfo
Definition
catch.hpp:2500
Catch::SectionInfo
Definition
catch.hpp:2484
libraries
sys-vm
external
Catch2
include
internal
catch_section.cpp
Generated by
1.12.0