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.


 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/.

David Coeurjolly (david.nosp@m..coe.nosp@m.urjol.nosp@m.ly@l.nosp@m.iris..nosp@m.cnrs.nosp@m..fr )

This file is part of the DGtal library

Definition in file testCatch.cpp.

Function Documentation


TEST_CASE ( "Point Vector Unit tests"  )

Description of testCatch'

Aim: simple test of Catch unit test framework


Definition at line 35 of file testCatch.cpp.

References REQUIRE(), and SECTION().

Referenced by SECTION().

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