Skip to content

Commit

Permalink
splitting unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
shajoezhu committed Oct 9, 2018
1 parent 11e4e60 commit d2070f8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
18 changes: 12 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ bin_PROGRAMS = dEploid dEploid_dbg utilities

man1_MANS = docs/_build/man/dEploid.1

TESTS = unit_tests
check_PROGRAMS = unit_tests dEploid_dbg dEploid_prof
TESTS = unit_tests io_unit_tests
check_PROGRAMS = unit_tests dEploid_dbg dEploid_prof io_unit_tests
PROG = DEPLOID

common_flags = -std=c++0x -Isrc/ -Isrc/codeCogs/ -Isrc/random/ -Isrc/gzstream/ -Isrc/lasso/ -DDEPLOIDVERSION=\"${DEPLOIDVERSION}\" -DCOMPILEDATE=\"${COMPILEDATE}\"
Expand Down Expand Up @@ -54,19 +54,25 @@ dEploid_prof_LDADD = $(common_LDADD)

unit_tests_SOURCES = $(common_src) \
tests/unittest/test_runner.cpp \
tests/unittest/test_dEploidIO.cpp \
tests/unittest/test_ibd.cpp \
tests/unittest/test_updateSingleHap.cpp \
tests/unittest/test_utilities.cpp \
tests/unittest/test_panel.cpp \
tests/unittest/test_txtReader.cpp \
tests/unittest/test_mcmc.cpp \
tests/unittest/test_updatePairHap.cpp \
tests/unittest/test_vcfReader.cpp
tests/unittest/test_updatePairHap.cpp

unit_tests_CXXFLAGS = $(common_flags) -DNDEBUG -DUNITTEST -Wno-write-strings --coverage
unit_tests_LDADD = -lcppunit -ldl $(common_LDADD)

io_unit_tests_SOURCES = $(common_src) \
tests/unittest/test_runner.cpp \
tests/unittest/test_dEploidIO.cpp \
tests/unittest/test_txtReader.cpp \
tests/unittest/test_vcfReader.cpp

io_unit_tests_CXXFLAGS = $(common_flags) -DNDEBUG -DUNITTEST -Wno-write-strings --coverage
io_unit_tests_LDADD = -lcppunit -ldl $(common_LDADD)

clean-local: clean-local-check
.PHONY: clean-local-check utilities
clean-local-check:
Expand Down
3 changes: 1 addition & 2 deletions src/dEploidIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,7 @@ void DEploidIO::dEploidLasso() {
vector < vector <double> > tmpPanel = lassoSubsetPanel(start, length);
DEploidLASSO dummy(tmpPanel, wsaf, 250);
lassoPanels.push_back(dummy.reducedPanel);


lassoPlafs.push_back(vector <double> (plaf_.begin()+start, plaf_.begin()+start+length));

// for (size_t i = 0; i < dummy.choiceIdx.size(); i++) {
// cout << dummy.choiceIdx[i] << " " ;
Expand Down
1 change: 1 addition & 0 deletions src/dEploidIO.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ class DEploidIO{

// Lasso Related
vector < vector < vector <double> > > lassoPanels;
vector < vector <double> > lassoPlafs;

// Parameters
double missCopyProb_;
Expand Down

0 comments on commit d2070f8

Please sign in to comment.