Changeset 679
- Timestamp:
- Oct 11, 2006, 2:37:55 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/data_lookup_1d_test.cc
r675 r679 26 26 #include "yat/classifier/MatrixLookup.h" 27 27 28 29 #include <cstdio> 28 30 #include <fstream> 29 31 #include <iostream> … … 34 36 35 37 utility::matrix matrix(size_t n); 38 int end_test(std::ostream*, bool); 36 39 37 40 int main(const int argc,const char* argv[]) … … 47 50 std::cout << "lookup_test -v : for printing extra information\n"; 48 51 } 52 49 53 50 54 *error << "Testing Lookup Classes" << std::endl; 51 55 bool ok = true; 56 57 if(!std::numeric_limits<double>::has_quiet_NaN) { 58 *error << "Error: a compiler without quiet_NaN is used!\n" 59 << "This will likely also mess up a lot of other yat tests\n"; 60 ok=false; 61 return end_test(error,ok); 62 } 63 64 52 65 53 66 *error << "Testing DataLookup1D" << std::endl; … … 132 145 *error << "\nERROR\n" << std::endl; 133 146 } 134 unlink("data/tmp_test_datalookup1D.txt");147 std::remove("data/tmp_test_datalookup1D.txt"); 135 148 136 149 // Second with a vector with a missing value separated by '\t'. … … 152 165 << std::endl; 153 166 } 154 unlink("data/tmp_test_datalookup1D.txt");167 std::remove("data/tmp_test_datalookup1D.txt"); 155 168 156 157 if (ok) 158 *error << "Ok." << std::endl; 159 if (error!=&std::cerr) 160 delete error; 161 return (ok ? 0 : -1); 169 return end_test(error,ok); 162 170 } 163 171 … … 171 179 } 172 180 181 int end_test(std::ostream* error, bool ok) 182 { 183 if (ok) 184 *error << "Ok." << std::endl; 185 if (error!=&std::cerr) 186 delete error; 187 return (ok ? 0 : -1); 188 } -
trunk/test/kernel_test.cc
r675 r679 188 188 index[1]=2; 189 189 index[2]=3; 190 classifier::KernelLookup kv(classifier::KernelLookup(kernel),index, index); 190 classifier::KernelLookup kv_raw(kernel); 191 classifier::KernelLookup kv(kv_raw,index, index); 191 192 if (kv.rows()!=index.size()){ 192 193 *error << "Error: KernelLookup(kernel, index)\n" << std::endl -
trunk/test/matrix_test.cc
r675 r679 24 24 #include "yat/utility/matrix.h" 25 25 26 #include < unistd.h>26 #include <cstdio> 27 27 #include <fstream> 28 28 #include <iostream> … … 76 76 if (m3!=m2) 77 77 ok=false; 78 unlink("data/tmp_test_matrix.txt");78 std::remove("data/tmp_test_matrix.txt"); 79 79 80 80 *error << "\toperator*(double)" << std::endl; -
trunk/yat/utility/CommandLine.h
r675 r679 27 27 #include "Option.h" 28 28 29 #include <cctype> 29 30 #include <list> 30 31 #include <map>
Note: See TracChangeset
for help on using the changeset viewer.