|
[yoda-svn] r332 - in trunk: include/YODA tests tests/Histo1Dblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Aug 23 11:06:55 BST 2011
Author: buckley Date: Tue Aug 23 11:06:55 2011 New Revision: 332 Log: Fixing the Profile1D merging bug -- missing addition of the y distribution in Dbn2D -- and renaming the new histo 1D constructor test to match the svn:ignore test* pattern in the tests directory Modified: trunk/include/YODA/Dbn2D.h trunk/tests/Histo1D/Constructors.cc trunk/tests/Makefile.am Modified: trunk/include/YODA/Dbn2D.h ============================================================================== --- trunk/include/YODA/Dbn2D.h Tue Aug 23 10:33:01 2011 (r331) +++ trunk/include/YODA/Dbn2D.h Tue Aug 23 11:06:55 2011 (r332) @@ -238,6 +238,7 @@ /// Add two dbns (internal, explicitly named version) Dbn2D& add(const Dbn2D& d) { _dbnX += d._dbnX; + _dbnY += d._dbnY; _sumWXY += d._sumWXY; return *this; } @@ -245,6 +246,7 @@ /// Subtract one dbn from another (internal, explicitly named version) Dbn2D& subtract(const Dbn2D& d) { _dbnX -= d._dbnX; + _dbnY -= d._dbnY; _sumWXY -= d._sumWXY; return *this; } Modified: trunk/tests/Histo1D/Constructors.cc ============================================================================== --- trunk/tests/Histo1D/Constructors.cc Tue Aug 23 10:33:01 2011 (r331) +++ trunk/tests/Histo1D/Constructors.cc Tue Aug 23 11:06:55 2011 (r332) @@ -13,41 +13,41 @@ cout << "The most basic, linear constructor. "; Histo1D h(100, 0, 100); - if(h.numBins() != 100) { + if (h.numBins() != 100) { cout << "FAIL" << endl << "Wrong number of bins was created!" << endl; return -1; } - if(h.lowEdge() != 0) { + if (h.lowEdge() != 0) { cout << "FAIL" << endl << "Low edge wasn't properly set!" << endl; return -1; } - if(h.highEdge() != 100) { + if (h.highEdge() != 100) { cout << "FAIL" << endl << "High edge wasn't properly set!" << endl; return -1; } - if(!fuzzyEquals(h.integral(), 0)) { + if (!fuzzyEquals(h.integral(), 0)) { cout << "FAIL" << endl << "The constructor is setting some statistics!" << endl; return -1; } cout << "PASS" << endl; - cout << "Explitit bin edges constructor: "; + cout << "Explicit bin edges constructor: "; vector<double> edges; - for(int i = 0; i < 101; ++i) edges.push_back(i); + for (int i = 0; i < 101; ++i) edges.push_back(i); Histo1D h1(edges); - if(h1.numBins() != 100) { + if (h1.numBins() != 100) { cout << "FAIL" << endl << "Wrong number of bins was created!" << endl; return -1; } - if(h1.lowEdge() != 0) { + if (h1.lowEdge() != 0) { cout << "FAIL" << endl << "Low edge wasn't properly set!" << endl; return -1; } - if(h1.highEdge() != 100) { + if (h1.highEdge() != 100) { cout << "FAIL" << endl << "High edge wasn't properly set!" << endl; return -1; } - if(!fuzzyEquals(h1.integral(), 0)) { + if (!fuzzyEquals(h1.integral(), 0)) { cout << "FAIL" << endl << "The constructor is setting some statistics!" << endl; return -1; } @@ -55,23 +55,23 @@ cout << "Copy constructor: "; Histo1D h2(h); - if(h2.numBins() != 100) { + if (h2.numBins() != 100) { cout << "FAIL" << endl << "Wrong number of bins was created!" << endl; return -1; } - if(h2.lowEdge() != 0) { + if (h2.lowEdge() != 0) { cout << "FAIL" << endl << "Low edge wasn't properly set!" << endl; return -1; } - if(h2.highEdge() != 100) { + if (h2.highEdge() != 100) { cout << "FAIL" << endl << "High edge wasn't properly set!" << endl; return -1; } - if(!fuzzyEquals(h2.integral(), 0)) { + if (!fuzzyEquals(h2.integral(), 0)) { cout << "FAIL" << endl << "The constructor is setting some statistics!" << endl; return -1; } cout << "PASS" << endl; - + return EXIT_SUCCESS; } Modified: trunk/tests/Makefile.am ============================================================================== --- trunk/tests/Makefile.am Tue Aug 23 10:33:01 2011 (r331) +++ trunk/tests/Makefile.am Tue Aug 23 11:06:55 2011 (r332) @@ -1,14 +1,14 @@ check_PROGRAMS = \ - testweights \ - testhisto1Da testhisto1Db \ - testprofile1Da \ + testweights \ + testhisto1Da testhisto1Db \ + testprofile1Da \ testhisto2D \ testhisto2Da \ testhisto2De \ testpoint3D \ testscatter3D\ - testindexedset testsortedvector\ - histo1Dconstructor + testindexedset testsortedvector\ + testhisto1Dconstructor AM_CPPFLAGS = -I$(top_srcdir)/include AM_LDFLAGS = -L$(top_builddir)/src -lYODA @@ -24,7 +24,7 @@ testhisto2De_SOURCES = TestHisto2Derase.cc testpoint3D_SOURCES = TestPoint3D.cc testscatter3D_SOURCES = TestScatter3D.cc -histo1Dconstructor_SOURCES = Histo1D/Constructors.cc +testhisto1Dconstructor_SOURCES = Histo1D/Constructors.cc # TODO: Search paths are still not complete for the Python tests: need to add the lib.linux-i686-2.7 part to PYTHONPATH TESTS_ENVIRONMENT = \ @@ -33,14 +33,14 @@ PATH=$(top_builddir)/bin:$(PATH) TESTS = \ - testweights \ - testhisto1Da testhisto1Db \ - testprofile1Da \ + testweights \ + testhisto1Da testhisto1Db \ + testprofile1Da \ testhisto2D \ testhisto2Da \ testhisto2De \ testpoint3D \ testscatter3D \ - testindexedset testsortedvector \ - test-yoda-1.py test-yoda-2.py \ - histo1Dconstructor + testindexedset testsortedvector \ + testhisto1Dconstructor \ + test-yoda-1.py test-yoda-2.py
More information about the yoda-svn mailing list |