File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
testDigitalMetricAdapter.cpp File Reference
#include <iostream>
#include "DGtal/base/Common.h"
#include "ConfigTest.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/geometry/volumes/distance/CDigitalMetricSpace.h"
#include "DGtal/geometry/volumes/distance/DigitalMetricAdapter.h"
Include dependency graph for testDigitalMetricAdapter.cpp:

Go to the source code of this file.

Functions

bool testConcepts ()
bool testVal ()
int main (int argc, char **argv)

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

Author
David Coeurjolly (david.nosp@m..coe.nosp@m.urjol.nosp@m.ly@l.nosp@m.iris..nosp@m.cnrs.nosp@m..fr ) Laboratoire d'InfoRmatique en Image et Systemes d'information - LIRIS (CNRS, UMR 5205), CNRS, France
Date
2014/07/02

Functions for testing class DigitalMetricAdapter.

This file is part of the DGtal library.

Definition in file testDigitalMetricAdapter.cpp.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 93 of file testDigitalMetricAdapter.cpp.

94{
95 trace.beginBlock ( "Testing class DigitalMetricAdapter" );
96 trace.info() << "Args:";
97 for ( int i = 0; i < argc; ++i )
98 trace.info() << " " << argv[ i ];
99 trace.info() << endl;
100
101 bool res = testConcepts() && testVal(); // && ... other tests
102 trace.emphase() << ( res ? "Passed." : "Error." ) << endl;
103 trace.endBlock();
104 return res ? 0 : 1;
105}
Trace trace
bool testConcepts()

References testConcepts(), testVal(), and DGtal::trace.

◆ testConcepts()

bool testConcepts ( )

Example of a test. To be completed.

Definition at line 49 of file testDigitalMetricAdapter.cpp.

50{
51 unsigned int nbok = 0;
52 unsigned int nb = 0;
53
54 typedef Z2i::L2Metric L2;
55 L2 l2;
56 typedef DigitalMetricAdapter<L2> Adapted;
57
58 Adapted adapted(l2);
59
60 BOOST_CONCEPT_ASSERT(( concepts::CDigitalMetricSpace<Adapted> ));
61
62 return nbok == nb;
63}

Referenced by main().

◆ testVal()

bool testVal ( )

Example of a test. To be completed.

Definition at line 67 of file testDigitalMetricAdapter.cpp.

References DGtal::trace.

Referenced by main().