Changeset 439 for library/tests
- Timestamp:
- 07/28/09 16:44:38 (15 years ago)
- Location:
- library/tests
- Files:
-
- 2 added
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
library/tests/CMakeLists.txt
r436 r439 7 7 link_directories (./unittest-cpp) 8 8 9 add_library(testutil e pdf_harness.cpp epdf_harness.h mat_checks.cpp mat_checks.h test_util.cpp test_util.h)9 add_library(testutil egiw_harness.cpp egiw_harness.h epdf_harness.cpp epdf_harness.h mat_checks.cpp mat_checks.h test_util.cpp test_util.h) 10 10 target_link_libraries(testutil bdm itpp unittest) 11 11 -
library/tests/epdf_harness.cpp
r436 r439 44 44 UI::get(mean, set, "mean"); 45 45 UI::get(variance, set, "variance"); 46 UI::get(lognc, set, "lognc");47 46 UI::get(support, set, "support"); 48 47 … … 63 62 CHECK_CLOSE(mean, num_mean2(hepdf.get(), xb, yb, nsamples, nsamples), 0.1); 64 63 CHECK_CLOSE(integral, normcoef(hepdf.get(), xb, yb, nsamples, nsamples), 0.1); 65 66 egiw *wide = dynamic_cast<egiw *>(hepdf.get());67 CHECK(wide);68 69 CHECK_CLOSE(lognc, wide->lognc(), epsilon);70 64 } 71 65 -
library/tests/epdf_harness.h
r436 r439 31 31 vec mean; 32 32 vec variance; 33 double lognc;34 33 mat support; 35 34 int nsamples; … … 37 36 38 37 public: 39 epdf_harness(): lognc(0),nsamples(100), integral(0) { }38 epdf_harness():nsamples(100), integral(0) { } 40 39 41 v oid test();40 virtual void test(); 42 41 43 42 void from_setting(const Setting &set); 43 44 protected: 45 epdf *get_epdf() { return hepdf.get(); } 44 46 }; 45 47