mirror of
https://github.com/OpenCMT/uLib.git
synced 2025-12-06 07:21:31 +01:00
Fixed unit tests
This commit is contained in:
@@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
#include "Core/Object.h"
|
#include "Core/Object.h"
|
||||||
#include "Core/Archives.h"
|
#include "Core/Archives.h"
|
||||||
#include "ParticlePhysics/MuonTomography/MuonScatter.h"
|
|
||||||
|
|
||||||
#include "testing-prototype.h"
|
#include "testing-prototype.h"
|
||||||
|
|
||||||
@@ -189,48 +188,12 @@ int testing_hrt_class() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// MUON SCATTER EXAMPLE //
|
|
||||||
|
|
||||||
int testing_mu()
|
|
||||||
{
|
|
||||||
std::stringstream ss;
|
|
||||||
|
|
||||||
MuonScatter mu;
|
|
||||||
mu.SetMomentumIn(555);
|
|
||||||
mu.SetMomentumOut(2368);
|
|
||||||
{
|
|
||||||
std::ofstream file("test.txt");
|
|
||||||
file << mu;
|
|
||||||
}
|
|
||||||
|
|
||||||
mu.SetMomentumIn(0);
|
|
||||||
mu.SetMomentumOut(0);
|
|
||||||
{
|
|
||||||
std::ifstream file("test.txt");
|
|
||||||
file >> mu;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << mu << "\n";
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
BEGIN_TESTING(Serialize Test);
|
BEGIN_TESTING(Serialize Test);
|
||||||
|
|
||||||
TEST1( test_V3f() );
|
TEST1( test_V3f() );
|
||||||
TEST1( testing_xml_class() );
|
TEST1( testing_xml_class() );
|
||||||
// testing_hrt_class(); ///// << ERRORE in HRT with properties
|
// testing_hrt_class(); ///// << ERRORE in HRT with properties
|
||||||
TEST1( testing_mu() );
|
|
||||||
|
|
||||||
END_TESTING;
|
END_TESTING;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,9 +237,9 @@ public:
|
|||||||
// std::cout << boost::mpl::at_c< BitSet,1 >::type::value << "\n";
|
// std::cout << boost::mpl::at_c< BitSet,1 >::type::value << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
int Get(unsigned short field) const {
|
// int Get(unsigned short field) const {
|
||||||
return boost::mpl::at_c< BitSet, field >::type::value;
|
// return boost::mpl::at_c< BitSet, field >::type::value;
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,5 +14,9 @@ set(TESTS
|
|||||||
BitCodeTest
|
BitCodeTest
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(LIBRARIES
|
||||||
|
${PACKAGE_LIBPREFIX}Core
|
||||||
|
${PACKAGE_LIBPREFIX}Math
|
||||||
|
)
|
||||||
|
|
||||||
uLib_add_tests(${uLib-module})
|
uLib_add_tests(${uLib-module})
|
||||||
|
|||||||
Reference in New Issue
Block a user