Changeset 469
- Timestamp:
- 08/04/09 10:51:00 (15 years ago)
- Location:
- library
- Files:
-
- 2 added
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
library/system/SetBdmEnv.cmake
r415 r469 98 98 target_link_libraries (${FN} ${ARGN}) ## Additional libraries can be added to a macro 99 99 ENDMACRO(EXEC) 100 101 MACRO(LINK_EXEC FN) 102 IF(WIN32) 103 target_link_libraries (${FN} debug itpp_debug) 104 target_link_libraries (${FN} optimized itpp) 105 target_link_libraries (${FN} libacml_dll) 106 ELSE(WIN32) 107 IF(APPLE) 108 target_link_libraries (${FN} ${FRAMEWORK_VECLIB}) 109 ENDIF(APPLE) 110 target_link_libraries (${FN} itpp) 111 ENDIF(WIN32) 112 target_link_libraries (${FN} bdm) 113 ENDMACRO(LINK_EXEC) 100 114 101 115 MACRO(MEX FN) -
library/tests/CMakeLists.txt
r468 r469 7 7 link_directories (./unittest-cpp) 8 8 9 add_library(testutil egiw_harness.cpp egiw_harness.h epdf_harness.cpp epdf_harness.h mat_checks.cpp mat_checks.h mpdf_harness.cpp mpdf_harness.h square_mat_point.cpp square_mat_point.h test_util.cpp test_util.h) 9 SET(testutil_src egiw_harness.cpp egiw_harness.h epdf_harness.cpp epdf_harness.h mat_checks.cpp mat_checks.h mpdf_harness.cpp mpdf_harness.h square_mat_point.cpp square_mat_point.h test_util.cpp test_util.h) 10 11 IF(WIN32) 12 SET(testutil_src ${testutil_src} dirent.c dirent.h) 13 ENDIF() 14 15 add_library(testutil ${testutil_src}) 10 16 target_link_libraries(testutil bdm itpp unittest) 11 17 12 18 add_executable(square_mat_stress square_mat_stress.cpp) 13 target_link_libraries(square_mat_stress bdm itpp testutil unittest) 19 target_link_libraries(square_mat_stress testutil unittest) 20 LINK_EXEC(square_mat_stress) 14 21 15 22 add_executable(square_mat_prep additive_generator.cpp additive_generator.h generator.cpp generator.h size_generator.cpp size_generator.h square_mat_prep.cpp) 16 target_link_libraries(square_mat_prep bdm itpp testutil) 23 target_link_libraries(square_mat_prep testutil) 24 LINK_EXEC(square_mat_prep) 17 25 18 26 EXEC(emix_test) … … 37 45 # using UnitTest++ 38 46 add_executable(testsuite datalink_test.cpp egiw_test.cpp epdf_test.cpp loggers_test.cpp mpdf_test.cpp rv_test.cpp square_mat_test.cpp testsuite.cpp test_user_info.cpp test_shared_ptr.cpp) 39 target_link_libraries(testsuite bdm itpp testutil unittest) 47 target_link_libraries(testsuite testutil unittest) 48 LINK_EXEC(testsuite) 40 49 41 50 add_subdirectory(tutorial) -
library/tests/epdf_harness.cpp
r466 r469 88 88 mat er = (smp * smp.T()) / nsamples - outer_product(emu, emu); 89 89 90 vec delta = sqrt(variance) / sqrt(nsamples); 90 // simplify overloading for Visual Studio 91 vec delta = sqrt(variance) / sqrt(static_cast<double>(nsamples)); 91 92 CHECK_CLOSE_EX(mean, emu, delta); 92 93 … … 108 109 vec emu = sum(smp, 2) / nsamples; 109 110 110 vec delta = sqrt(variance) / sqrt(nsamples); 111 // simplify overloading for Visual Studio 112 vec delta = sqrt(variance) / sqrt(static_cast<double>(nsamples)); 111 113 CHECK_CLOSE_EX(mean, emu, delta); 112 114 -
library/tests/loggers_test.cpp
r425 r469 2 2 #include "base/loggers.h" 3 3 #include "test_util.h" 4 #include "osutils.h" 4 5 #include "UnitTest++.h" 5 6 #include <string> … … 14 15 RV r = RV("{r }", "2"); 15 16 16 if (mkdir("exp", 0777)) {17 makedir(string("exp")); 17 18 remove_all("exp/dirfile"); 18 }19 19 20 20 dirfilelog L("exp/dirfile", 10); -
library/tests/test_util.cpp
r449 r469 5 5 #include <stdexcept> 6 6 #include <string> 7 #include <dirent.h>8 7 #include <errno.h> 9 8 #include <fcntl.h> 10 9 #include <string.h> 10 #include <stdio.h> 11 11 #include <sys/stat.h> 12 12 #include <sys/types.h> 13 14 #ifdef WIN32 15 #include "dirent.h" 16 #include <direct.h> 17 #define rmdir _rmdir 18 #define unlink _unlink 19 #else 20 #include <dirent.h> 13 21 #include <unistd.h> 22 #endif 14 23 15 24 namespace bdm {