diff --git a/inst/cta/include/GCTAResponseCube.hpp b/inst/cta/include/GCTAResponseCube.hpp index 29f8745..f61256e 100644 --- a/inst/cta/include/GCTAResponseCube.hpp +++ b/inst/cta/include/GCTAResponseCube.hpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAResponseCube.hpp - CTA cube analysis response function class * * ----------------------------------------------------------------------- * - * copyright (C) 2014-2018 by Juergen Knoedlseder * + * copyright (C) 2014-2020 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -112,7 +112,6 @@ private: void init_members(void); void copy_members(const GCTAResponseCube& rsp); void free_members(void); - int cache_index(const std::string& name) const; double psf_radial(const GModelSpatialRadial* model, const double& rho_obs, const GSkyDir& obsDir, diff --git a/inst/cta/src/GCTAModelAeffBackground.cpp b/inst/cta/src/GCTAModelAeffBackground.cpp index 832e102..359180c 100644 --- a/inst/cta/src/GCTAModelAeffBackground.cpp +++ b/inst/cta/src/GCTAModelAeffBackground.cpp @@ -768,7 +768,6 @@ void GCTAModelAeffBackground::read(const GXmlElement& xml) // Initialise XML elements const GXmlElement* spectral = NULL; - const GXmlElement* temporal = NULL; // Get pointer on spectrum spectral = xml.element("spectrum", 0); @@ -778,7 +777,7 @@ void GCTAModelAeffBackground::read(const GXmlElement& xml) // Optionally get temporal model if (xml.elements("temporalModel")) { - temporal = xml.element("temporalModel", 0); + const GXmlElement* temporal = xml.element("temporalModel", 0); m_temporal = xml_temporal(*temporal); } else { diff --git a/inst/cta/src/GCTAModelBackground.cpp b/inst/cta/src/GCTAModelBackground.cpp index eca462a..a8a134c 100644 --- a/inst/cta/src/GCTAModelBackground.cpp +++ b/inst/cta/src/GCTAModelBackground.cpp @@ -521,7 +521,6 @@ GCTAEventList* GCTAModelBackground::mc(const GObservation& obs, // Get reference on CTA pointing, background response and event list // from observation const GCTAObservation& cta = gammalib::cta_obs(G_MC, obs); - const GCTAPointing& pnt = gammalib::cta_pnt(G_MC, obs); const GCTAEventList& events = gammalib::cta_event_list(G_MC, obs); // Get simulation region diff --git a/inst/cta/src/GCTAModelCubeBackground.cpp b/inst/cta/src/GCTAModelCubeBackground.cpp index 017a649..3c395f4 100644 --- a/inst/cta/src/GCTAModelCubeBackground.cpp +++ b/inst/cta/src/GCTAModelCubeBackground.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAModelCubeBackground.cpp - CTA cube background model class * * ----------------------------------------------------------------------- * - * copyright (C) 2013-2018 by Michael Mayer * + * copyright (C) 2013-2020 by Michael Mayer * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -551,7 +551,6 @@ void GCTAModelCubeBackground::read(const GXmlElement& xml) // Initialise XML elements const GXmlElement* spectral = NULL; - const GXmlElement* temporal = NULL; // Get pointer on spectrum spectral = xml.element("spectrum", 0); @@ -561,7 +560,7 @@ void GCTAModelCubeBackground::read(const GXmlElement& xml) // Optionally get temporal model if (xml.elements("temporalModel")) { - temporal = xml.element("temporalModel", 0); + const GXmlElement* temporal = xml.element("temporalModel", 0); m_temporal = xml_temporal(*temporal); } else { diff --git a/inst/cta/src/GCTAModelIrfBackground.cpp b/inst/cta/src/GCTAModelIrfBackground.cpp index 01a84d8..2a0e10d 100644 --- a/inst/cta/src/GCTAModelIrfBackground.cpp +++ b/inst/cta/src/GCTAModelIrfBackground.cpp @@ -699,7 +699,6 @@ void GCTAModelIrfBackground::read(const GXmlElement& xml) // Initialise XML elements const GXmlElement* spectral = NULL; - const GXmlElement* temporal = NULL; // Get pointer on spectrum spectral = xml.element("spectrum", 0); @@ -709,7 +708,7 @@ void GCTAModelIrfBackground::read(const GXmlElement& xml) // Optionally get temporal model if (xml.elements("temporalModel")) { - temporal = xml.element("temporalModel", 0); + const GXmlElement* temporal = xml.element("temporalModel", 0); m_temporal = xml_temporal(*temporal); } else { diff --git a/inst/cta/src/GCTAModelRadialAcceptance.cpp b/inst/cta/src/GCTAModelRadialAcceptance.cpp index dc08386..c987f79 100644 --- a/inst/cta/src/GCTAModelRadialAcceptance.cpp +++ b/inst/cta/src/GCTAModelRadialAcceptance.cpp @@ -664,7 +664,6 @@ void GCTAModelRadialAcceptance::read(const GXmlElement& xml) // Initialise XML elements const GXmlElement* rad = NULL; const GXmlElement* spec = NULL; - const GXmlElement* temp = NULL; // Get pointers on spectrum and radial model rad = xml.element("radialModel", 0); @@ -676,7 +675,7 @@ void GCTAModelRadialAcceptance::read(const GXmlElement& xml) // Optionally get temporal model try { - temp = xml.element("lightcurve", 0); + const GXmlElement* temp = xml.element("lightcurve", 0); m_temporal = xml_temporal(*temp); } catch (GException::xml_name_not_found &e) { diff --git a/inst/cta/src/GCTAModelSpatial.cpp b/inst/cta/src/GCTAModelSpatial.cpp index 5828b83..760cc72 100644 --- a/inst/cta/src/GCTAModelSpatial.cpp +++ b/inst/cta/src/GCTAModelSpatial.cpp @@ -299,7 +299,6 @@ GCTAInstDir GCTAModelSpatial::mc(const GEnergy& energy, // Initialise rejection method double f = 0.0; double ftest = 1.0; - int zeros = 0; const int max_subsequent_zeros = 10; // Find instrument direction by rejection method diff --git a/inst/cta/src/GCTAOnOffObservation.cpp b/inst/cta/src/GCTAOnOffObservation.cpp index 3a1a637..2311dba 100644 --- a/inst/cta/src/GCTAOnOffObservation.cpp +++ b/inst/cta/src/GCTAOnOffObservation.cpp @@ -970,8 +970,8 @@ GPha GCTAOnOffObservation::model_background(const GModels& models) const // Perform likelihood profiling and derive likelihood value // The number of background counts is updated to the profile value - double logL = wstat_value(non, noff, alpha, ngam, nonpred, nbgd, - dlogLdsky,d2logLdsky2); + wstat_value(non, noff, alpha, ngam, nonpred, nbgd, + dlogLdsky,d2logLdsky2); } // endelse: WSTAT @@ -2463,9 +2463,6 @@ double GCTAOnOffObservation::N_bgd(const GModels& models, // Continue only if bin number is valid and if there are model parameters if ((ibin >= 0) && (ibin < m_on_spec.size()) && (npars > 0)) { - // Initialise parameter index - int ipar = 0; - // Get reconstructed energy bin mean and width GEnergy emean = m_on_spec.ebounds().elogmean(ibin); double ewidth = m_on_spec.ebounds().ewidth(ibin).MeV(); @@ -2482,7 +2479,7 @@ double GCTAOnOffObservation::N_bgd(const GModels& models, double norm = background * exposure * ewidth; // Loop over models - for (int j = 0; j < models.size(); ++j) { + for (int j = 0, ipar = 0; j < models.size(); ++j) { // Get model pointer. Fall through if pointer is not valid const GModel* mptr = models[j]; @@ -2666,18 +2663,17 @@ double GCTAOnOffObservation::likelihood_cstat(const GModels& models, int n_zero_data = 0; double sum_data = 0.0; double sum_model = 0.0; - double init_npred = *npred; #endif - // Initialise log-likelihood value + // Initialise log-likelihood value double value = 0.0; - // Get number of model parameters in model container + // Get number of model parameters in model container int npars = models.npars(); - // Create model gradient vectors for sky and background parameters - GVector sky_grad(npars); - GVector bgd_grad(npars); + // Create model gradient vectors for sky and background parameters + GVector sky_grad(npars); + GVector bgd_grad(npars); // Allocate working array GVector colvar(npars); @@ -2909,7 +2905,6 @@ double GCTAOnOffObservation::likelihood_wstat(const GModels& models, int n_used = 0; double sum_data = 0.0; double sum_model = 0.0; - double init_npred = *npred; #endif // Initialise log-likelihood value diff --git a/inst/cta/src/GCTAResponseCube.cpp b/inst/cta/src/GCTAResponseCube.cpp index 34b83fb..fd58246 100644 --- a/inst/cta/src/GCTAResponseCube.cpp +++ b/inst/cta/src/GCTAResponseCube.cpp @@ -685,37 +685,6 @@ void GCTAResponseCube::free_members(void) } -/***********************************************************************//** - * @brief Determine cache index for model - * - * @param[in] name Model name. - * @return Cache index (-1 if model has not been found). - * - * Determines the cache index for a given model @p name. - ***************************************************************************/ -int GCTAResponseCube::cache_index(const std::string& name) const -{ - // Initialise index - int index = -1; - - // Continue only if there are models in cache - if (!m_cache.empty()) { - - // Search for model name - for (int i = 0; i < m_cache.size(); ++i) { - if (m_cache[i]->name() == name) { - index = i; - break; - } - } - - } // endif: there were models in cache - - // Return index - return index; -} - - #if defined(G_RADIAL_PSF_BASED) /***********************************************************************//** * @brief Integrate Psf over radial model @@ -1554,10 +1523,10 @@ double GCTAResponseCube::irf_diffuse(const GEvent& event, } // Apply deadtime correction - irf *= exposure().deadc(); + irf *= deadc; } // endif: exposure was positive - + } // endif: livetime was positive // Compile option: Check for NaN/Inf diff --git a/inst/cta/src/GCTASupport.cpp b/inst/cta/src/GCTASupport.cpp index 3a1d6dc..1355e16 100644 --- a/inst/cta/src/GCTASupport.cpp +++ b/inst/cta/src/GCTASupport.cpp @@ -252,7 +252,7 @@ GPhases gammalib::read_ds_phase(const GFitsHDU& hdu) // Set data sub-space key strings std::string type_key = "DSTYP"+gammalib::str(i); - std::string unit_key = "DSUNI"+gammalib::str(i); + //std::string unit_key = "DSUNI"+gammalib::str(i); std::string value_key = "DSVAL"+gammalib::str(i); // Continue only if type_key is found and if this key is PHASE @@ -318,7 +318,7 @@ std::string gammalib::read_ds_gti_extname(const GFitsHDU& hdu) // Set data sub-space key strings std::string type_key = "DSTYP"+gammalib::str(i); - std::string unit_key = "DSUNI"+gammalib::str(i); + //std::string unit_key = "DSUNI"+gammalib::str(i); std::string value_key = "DSVAL"+gammalib::str(i); std::string ref_key = "DSREF"+gammalib::str(i); diff --git a/inst/lat/src/GLATEdisp.cpp b/inst/lat/src/GLATEdisp.cpp index 270300c..c8b0393 100644 --- a/inst/lat/src/GLATEdisp.cpp +++ b/inst/lat/src/GLATEdisp.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATEdisp.cpp - Fermi LAT energy dispersion * * ----------------------------------------------------------------------- * - * copyright (C) 2008-2018 by Juergen Knoedlseder * + * copyright (C) 2008-2020 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -253,9 +253,11 @@ void GLATEdisp::read(const GFits& fits, const std::string& evtype) if (!fits.contains(engdisp)) { engdisp += "_" + m_evtype; } + /* if (!fits.contains(escales)) { escales += "_" + m_evtype; } + */ // Get pointer to effective area HDU const GFitsTable& hdu_edisp = *fits.table(engdisp); diff --git a/inst/lat/src/GLATEventList.cpp b/inst/lat/src/GLATEventList.cpp index f97155e..a2e136f 100644 --- a/inst/lat/src/GLATEventList.cpp +++ b/inst/lat/src/GLATEventList.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * GLATEventList.cpp - Fermi/LAT event list class * * ----------------------------------------------------------------------- * - * copyright (C) 2009-2017 by Juergen Knoedlseder * + * copyright (C) 2009-2020 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -548,9 +548,6 @@ void GLATEventList::read_events(const GFitsTable& table) // Clear existing events m_events.clear(); - // Allocate space for keyword name - char keyword[10]; - // Extract number of events in FT1 file int num = table.integer("NAXIS2"); @@ -616,6 +613,9 @@ void GLATEventList::read_events(const GFitsTable& table) // Load diffuse columns for (int k = 0; k < num_difrsp; ++k) { + // Allocate space for keyword name + char keyword[10]; + // Set keyword name std::sprintf(keyword, "DIFRSP%d", k); diff --git a/inst/spi/src/GSPIModelDataSpace.cpp b/inst/spi/src/GSPIModelDataSpace.cpp index 411aa8f..a225ddd 100644 --- a/inst/spi/src/GSPIModelDataSpace.cpp +++ b/inst/spi/src/GSPIModelDataSpace.cpp @@ -874,9 +874,6 @@ void GSPIModelDataSpace::setup_pars(GSPIEventCube* cube) for (int idet = 0; idet < ndet; ++idet) { for (int ieng = 0; ieng < neng; ++ieng) { - // Set energy name - std::string eng_name = (eng_names.size() > 0) ? eng_names[ieng] : ""; - // Build parameter name std::string par_name; if (m_name.empty()) { diff --git a/inst/spi/src/GSPIResponse.cpp b/inst/spi/src/GSPIResponse.cpp index a5fec29..9ffbbda 100644 --- a/inst/spi/src/GSPIResponse.cpp +++ b/inst/spi/src/GSPIResponse.cpp @@ -262,7 +262,6 @@ double GSPIResponse::irf(const GEvent& event, // Extract INTEGRAL/SPI event cube const GSPIEventCube* cube = dynamic_cast(spi_obs->events()); if (cube == NULL) { - std::string cls = std::string(typeid(&obs).name()); std::string msg = "INTEGRAL/SPI observation does not contain a valid " "event cube. Please specify an observation with an " "event cube as argument."; @@ -1171,7 +1170,6 @@ void GSPIResponse::load_irfs(const int& region) int nx = irf.nx(); int ny = irf.ny(); int ndet = irf.shape()[0]; - int nreg = irf.shape()[1]; // Loop over requested regions for (int i_region = 0; i_region < num_regions; ++i_region) { diff --git a/src/template/inst_test_XXX.cpp b/src/template/inst_test_XXX.cpp index 881add8..3153de9 100644 --- a/src/template/inst_test_XXX.cpp +++ b/src/template/inst_test_XXX.cpp @@ -103,15 +103,12 @@ int main(void) std::string caldb = "CALDB="+xxx_caldb; putenv((char*)caldb.c_str()); - // Initially assume that we pass all tests - bool success = true; - // Create test suites and append them to the container TestGXXX suite; testsuites.append(suite); // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GXXX.xml"); diff --git a/src/vo/GVOHub.cpp b/src/vo/GVOHub.cpp index 8dff039..af2d6db 100644 --- a/src/vo/GVOHub.cpp +++ b/src/vo/GVOHub.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * GVOHub.cpp - VO SAMP Hub class * * ----------------------------------------------------------------------- * - * copyright (C) 2014-2019 by Thierry Louge * + * copyright (C) 2014-2020 by Thierry Louge * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -2183,15 +2183,12 @@ std::string GVOHub::get_mtype(const GXml& xml) const std::cout << "In GVOHub::get_mtype" << std::endl; #endif - // Initialise response - std::string client_key = ""; - // Get the XML node containing the client's private key const GXmlNode* node = xml.element("methodCall > params > param[1] > " "value > struct "); // Get the client's private key - client_key = get_response_value(node, "samp.mtype"); + std::string client_key = get_response_value(node, "samp.mtype"); // Return key return client_key; diff --git a/test/test_GApplication.cpp b/test/test_GApplication.cpp index 8884655..f375676 100644 --- a/test/test_GApplication.cpp +++ b/test/test_GApplication.cpp @@ -692,9 +692,6 @@ int main(void) // Allocate test suit container GTestSuites testsuites("GApplication"); - // Initially assume that we pass all tests - bool success = true; - // Create a test suite TestGApplication test; @@ -702,7 +699,7 @@ int main(void) testsuites.append(test); // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GApplication.xml"); diff --git a/test/test_GFits.cpp b/test/test_GFits.cpp index d078101..fdcbe69 100644 --- a/test/test_GFits.cpp +++ b/test/test_GFits.cpp @@ -1731,9 +1731,6 @@ int main(void) // Allocate test suit container GTestSuites testsuites("FITS module"); - // Initially assume that we pass all tests - bool success = true; - // Create a test suite TestGFits test; @@ -1741,7 +1738,7 @@ int main(void) testsuites.append(test); // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GFits.xml"); diff --git a/test/test_GMatrix.cpp b/test/test_GMatrix.cpp index f4ac07c..7bf80f1 100644 --- a/test/test_GMatrix.cpp +++ b/test/test_GMatrix.cpp @@ -870,9 +870,6 @@ int main(void) // Allocate test suit container GTestSuites testsuites("GMatrix class testing"); - // Initially assume that we pass all tests - bool success = true; - // Create a test suite TestGMatrix test; @@ -880,7 +877,7 @@ int main(void) testsuites.append(test); // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GMatrix.xml"); diff --git a/test/test_GMatrixSparse.cpp b/test/test_GMatrixSparse.cpp index 2c55d53..393d090 100644 --- a/test/test_GMatrixSparse.cpp +++ b/test/test_GMatrixSparse.cpp @@ -1358,9 +1358,6 @@ int main(void) // Allocate test suit container GTestSuites testsuites("GMatrixSparse class testing"); - // Initially assume that we pass all tests - bool success = true; - // Create a test suite TestGMatrixSparse test; @@ -1368,7 +1365,7 @@ int main(void) testsuites.append(test); // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GMatrixSparse.xml"); diff --git a/test/test_GMatrixSymmetric.cpp b/test/test_GMatrixSymmetric.cpp index 3c241a8..0b3123c 100644 --- a/test/test_GMatrixSymmetric.cpp +++ b/test/test_GMatrixSymmetric.cpp @@ -848,9 +848,6 @@ int main(void) // Allocate test suit container GTestSuites testsuites("GMatrixSymmetric class testing"); - // Initially assume that we pass all tests - bool success = true; - // Create a test suite TestGMatrixSymmetric test; @@ -858,7 +855,7 @@ int main(void) testsuites.append(test); // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GMatrixSymmetric.xml"); diff --git a/test/test_GModel.cpp b/test/test_GModel.cpp index dc26b40..fd3f2de 100644 --- a/test/test_GModel.cpp +++ b/test/test_GModel.cpp @@ -3697,9 +3697,6 @@ int main(void) // Create test suites GTestSuites testsuite("GModel"); - // Initialise success flag - bool success = true; - // Create a test suite TestGModel test; @@ -3707,7 +3704,7 @@ int main(void) testsuite.append(test); // Run the testsuites - success = testsuite.run(); + bool success = testsuite.run(); // Save xml report testsuite.save("reports/GModel.xml"); diff --git a/test/test_GNumerics.cpp b/test/test_GNumerics.cpp index efc1dcf..9597f93 100644 --- a/test/test_GNumerics.cpp +++ b/test/test_GNumerics.cpp @@ -622,20 +622,18 @@ int main(void) { GTestSuites testsuite("GNumerics"); - bool was_successful=true; - - //Create a test suite + // Create a test suite TestGNumerics test; - //Append to the container + // Append to the container testsuite.append(test); - //Run - was_successful=testsuite.run(); + // Run + bool success = testsuite.run(); - //save xml report + // save xml report testsuite.save("reports/GNumerics.xml"); // Return - return was_successful ? 0:1; + return (success ? 0:1); } diff --git a/test/test_GObservation.cpp b/test/test_GObservation.cpp index 3b55e14..51082b7 100644 --- a/test/test_GObservation.cpp +++ b/test/test_GObservation.cpp @@ -1923,9 +1923,6 @@ int main(void) // Allocate test suit container GTestSuites testsuites("Observation module"); - // Initially assume that we pass all tests - bool success = true; - // Create and append test suites TestGObservation obs; testsuites.append(obs); @@ -1937,7 +1934,7 @@ int main(void) #endif // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GObservation.xml"); diff --git a/test/test_GOptimizer.cpp b/test/test_GOptimizer.cpp index dbcf297..809fdbc 100644 --- a/test/test_GOptimizer.cpp +++ b/test/test_GOptimizer.cpp @@ -190,15 +190,12 @@ int main(void) // Allocate test suit container GTestSuites testsuites("Optimizer module"); - // Initially assume that we pass all tests - bool success = true; - // Create and append test suite TestGOptimizer openmp; testsuites.append(openmp); // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GOptimizer.xml"); diff --git a/test/test_GSky.cpp b/test/test_GSky.cpp index 6efca05..9dd863b 100644 --- a/test/test_GSky.cpp +++ b/test/test_GSky.cpp @@ -1837,8 +1837,6 @@ int main(void) { GTestSuites testsuites("GSky"); - bool was_successful = true; - // Create a test suite TestGSky test; @@ -1846,7 +1844,7 @@ int main(void) testsuites.append(test); // Run - was_successful=testsuites.run(); + bool was_successful = testsuites.run(); // Save xml report testsuites.save("reports/GSky.xml"); diff --git a/test/test_GSupport.cpp b/test/test_GSupport.cpp index 3b00a8a..6e2cf12 100644 --- a/test/test_GSupport.cpp +++ b/test/test_GSupport.cpp @@ -988,9 +988,6 @@ int main(void) // Allocate test suite container GTestSuites testsuites("Support module"); - // Initially assume that we pass all tests - bool success = true; - // Create and append test suite TestGSupport test; @@ -998,7 +995,7 @@ int main(void) testsuites.append(test); // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GSupport.xml"); diff --git a/test/test_GVO.cpp b/test/test_GVO.cpp index 76febf0..16a594c 100644 --- a/test/test_GVO.cpp +++ b/test/test_GVO.cpp @@ -208,9 +208,6 @@ int main(void) // into the test directory) unsetenv("HOME"); - // Initially assume that we pass all tests - bool success = true; - // Create a test suite TestGVO test; @@ -218,7 +215,7 @@ int main(void) testsuites.append(test); // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GVO.xml"); diff --git a/test/test_GVector.cpp b/test/test_GVector.cpp index 76c7193..a0efc62 100644 --- a/test/test_GVector.cpp +++ b/test/test_GVector.cpp @@ -591,9 +591,6 @@ int main(void) // Allocate test suite container GTestSuites testsuites("GVector"); - // Initially assume that we pass all tests - bool was_successful=true; - // Create a test suite TestGVector test; @@ -601,7 +598,7 @@ int main(void) testsuites.append(test); // Run - was_successful=testsuites.run(); + bool was_successful = testsuites.run(); // Save xml report testsuites.save("reports/GVector.xml"); diff --git a/test/test_GXml.cpp b/test/test_GXml.cpp index b99fdde..154793d 100644 --- a/test/test_GXml.cpp +++ b/test/test_GXml.cpp @@ -321,9 +321,6 @@ int main(void) // Allocate test suit container GTestSuites testsuites("XML module"); - // Initially assume that we pass all tests - bool success = true; - // Create a test suite TestGXml test; @@ -331,7 +328,7 @@ int main(void) testsuites.append(test); // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GXml.xml"); diff --git a/test/test_GXspec.cpp b/test/test_GXspec.cpp index de6cccb..fb40121 100644 --- a/test/test_GXspec.cpp +++ b/test/test_GXspec.cpp @@ -573,9 +573,6 @@ int main(void) // Allocate test suit container GTestSuites testsuites("Xspec module"); - // Initially assume that we pass all tests - bool success = true; - // Create a test suite TestGXspec test; @@ -583,7 +580,7 @@ int main(void) testsuites.append(test); // Run the testsuites - success = testsuites.run(); + bool success = testsuites.run(); // Save test report testsuites.save("reports/GXspec.xml");