Commit 387654193895282ea3a3a6ee7d231195bdbd8d33

Authored by Jürgen Knödlseder
1 parent 8f0a5f82

Adapt unit test to new GCOMObservation interface

Showing 1 changed file with 5 additions and 3 deletions
inst/com/test/test_COM.cpp
1 1 /***************************************************************************
2 2 * test_COM.cpp - test COM classes *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2022 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2023 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,6 +45,7 @@ const std::string com_iaq = "SIM2(1.00-3.00)MeV(2)deg"; // 1-3 MeV
45 45 const std::string com_dre = datadir+"/m50439_dre.fits"; // 1-3 MeV
46 46 const std::string com_drb = datadir+"/m34997_drg.fits";
47 47 const std::string com_drg = datadir+"/m34997_drg.fits";
  48 +const std::string com_drw = "";
48 49 const std::string com_drx = datadir+"/m32171_drx.fits";
49 50 const std::string com_evp = datadir+"/m16992_tjd8393_evp.fits";
50 51 const std::string com_tim = datadir+"/m10695_tim.fits";
... ... @@ -583,11 +584,12 @@ void TestGCOM::test_binned_obs(void)
583 584 test_value(obs1.drxname().url(), "", "Test DRX filename for void observation");
584 585  
585 586 // Test DRI constructor
586   - GCOMObservation obs2(com_dre, com_drb, com_drg, com_drx);
  587 + GCOMObservation obs2(com_dre, com_drb, com_drw, com_drg, com_drx);
587 588 test_assert(!obs2.is_unbinned(), "Test if DRI observation is not unbinned");
588 589 test_assert(obs2.is_binned(), "Test if DRI observation is binned");
589 590 test_value(obs2.drename().url(), com_dre, "Test DRE filename for DRI observation");
590 591 test_value(obs2.drbname().url(), com_drb, "Test DRB filename for DRI observation");
  592 + test_value(obs2.drwname().url(), com_drw, "Test DRW filename for DRI observation");
591 593 test_value(obs2.drgname().url(), com_drg, "Test DRG filename for DRI observation");
592 594 test_value(obs2.drxname().url(), com_drx, "Test DRX filename for DRI observation");
593 595  
... ... @@ -897,7 +899,7 @@ void TestGCOM::test_binned_optimizer(void)
897 899 // Load binned COMPTEL observation
898 900 test_try("Load binned COMPTEL observation");
899 901 try {
900   - run.load(com_dre, com_drb, com_drg, com_drx);
  902 + run.load(com_dre, com_drb, com_drw, com_drg, com_drx);
901 903 run.response(GCaldb("cgro", "comptel"), com_iaq);
902 904 obs.append(run);
903 905 test_try_success();
... ...