DGtal  0.9.3
testCatch.cpp File Reference
#include "DGtalCatch.h"
Include dependency graph for testCatch.cpp:

Go to the source code of this file.

## Functions

TEST_CASE ("Point Vector Unit tests")

## Detailed Description

This program 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.

This program 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 Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Date
2015/08/06

This file is part of the DGtal library

Definition in file testCatch.cpp.

## ◆ TEST_CASE()

 TEST_CASE ( "Point Vector Unit tests" )

Description of testCatch'

Aim: simple test of Catch unit test framework

Examples:
doc-examples/exampleCatch.cpp.

Definition at line 35 of file testCatch.cpp.

References REQUIRE(), and SECTION().

Referenced by SECTION().

36 {
37
38  int a = 5;
39  int b = 3+2;
40  int c = a+1;
41
42  SECTION("Comparisons")
43  {
44  REQUIRE( a == b );
45  a=6;
46  REQUIRE( a == c );
47  }
48
49  SECTION("No side-effects on global variables in section scopes")
50  {
51  REQUIRE( a == 5 );
52  }
53 }
REQUIRE(domain.isInside(aPoint))
SECTION("Testing constant forward iterators")