mirror of
https://github.com/OpenCMT/uLib.git
synced 2025-12-05 23:11:31 +01:00
Fixed unit tests
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
|
||||
#include "Core/Object.h"
|
||||
#include "Core/Archives.h"
|
||||
#include "ParticlePhysics/MuonTomography/MuonScatter.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() {
|
||||
BEGIN_TESTING(Serialize Test);
|
||||
|
||||
TEST1( test_V3f() );
|
||||
TEST1( testing_xml_class() );
|
||||
// testing_hrt_class(); ///// << ERRORE in HRT with properties
|
||||
TEST1( testing_mu() );
|
||||
|
||||
END_TESTING;
|
||||
}
|
||||
|
||||
@@ -237,9 +237,9 @@ public:
|
||||
// std::cout << boost::mpl::at_c< BitSet,1 >::type::value << "\n";
|
||||
}
|
||||
|
||||
int Get(unsigned short field) const {
|
||||
return boost::mpl::at_c< BitSet, field >::type::value;
|
||||
}
|
||||
// int Get(unsigned short field) const {
|
||||
// return boost::mpl::at_c< BitSet, field >::type::value;
|
||||
// }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -14,5 +14,9 @@ set(TESTS
|
||||
BitCodeTest
|
||||
)
|
||||
|
||||
set(LIBRARIES
|
||||
${PACKAGE_LIBPREFIX}Core
|
||||
${PACKAGE_LIBPREFIX}Math
|
||||
)
|
||||
|
||||
uLib_add_tests(${uLib-module})
|
||||
|
||||
Reference in New Issue
Block a user