32 #include "DGtal/base/Common.h"
33 #include "DGtal/io/readers/TableReader.h"
34 #include "DGtal/helpers/StdDefs.h"
36 #include "ConfigTest.h"
41 using namespace DGtal;
53 unsigned int nbok = 0;
57 std::string filename = testPath +
"samples/pointList1.pl";
60 for(
unsigned int k=0;k < vectIntegers.size(); k++){
61 trace.
info() <<
" integer: "<< vectIntegers.at(k)<< endl;
63 nbok += (vectIntegers.at(0)==2 && vectIntegers.at(1)==44 && vectIntegers.at(2)==23
64 && vectIntegers.at(3)==1) ? 1 : 0;
66 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "<< std::endl;
71 std::vector<vector<unsigned int>> vectLineIntegers =
73 for (
unsigned int k = 0; k < vectLineIntegers.size(); k++ )
75 for (
unsigned int l = 0; l < vectLineIntegers.at( k ).size(); l++ )
77 trace.
info() <<
" integer: " << vectLineIntegers.at( k ).at( l ) <<
" ";
82 nbok += ( vectLineIntegers.at( 0 ).at( 0 ) == 1 &&
83 vectLineIntegers.at( 2 ).at( 2 ) == 9 &&
84 vectLineIntegers.at( 3 ).at( 2 ) == 1 )
88 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") " << std::endl;
94 for(
unsigned int k=0;k < vectStrings.size(); k++){
95 trace.
info() <<
" string: "<< vectStrings.at(k)<< endl;
97 nbok += (vectStrings.at(0)==
"3" && vectStrings.at(1)==
"4" && vectStrings.at(2)==
"9"
98 && vectStrings.at(3)==
"1") ? 1 : 0;
100 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "<< std::endl;
109 int main(
int argc,
char** argv )
113 for (
int i = 0; i < argc; ++i )
119 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
void beginBlock(const std::string &keyword="")
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Implements method to read a set of numbers represented in each line of a file.
int main(int argc, char **argv)