Skip to content
Snippets Groups Projects
Commit 97ed8e75 authored by Janik Zikovsky's avatar Janik Zikovsky
Browse files

Refs #1525: Extra test.

parent a40af800
No related branches found
No related tags found
No related merge requests found
...@@ -285,7 +285,7 @@ void testExecOnMuonXml() ...@@ -285,7 +285,7 @@ void testExecOnMuonXml()
void do_testExec_EventWorkspaces(EventType type) void do_testExec_EventWorkspaces(EventType type, bool makeDifferentTypes=false)
{ {
std::vector< std::vector<int> > groups(5); std::vector< std::vector<int> > groups(5);
groups[0].push_back(10); groups[0].push_back(10);
...@@ -300,8 +300,18 @@ void do_testExec_EventWorkspaces(EventType type) ...@@ -300,8 +300,18 @@ void do_testExec_EventWorkspaces(EventType type)
EventWorkspace_sptr WS = WorkspaceCreationHelper::CreateGroupedEventWorkspace(groups, 100, 1.0); EventWorkspace_sptr WS = WorkspaceCreationHelper::CreateGroupedEventWorkspace(groups, 100, 1.0);
WS->getEventList(3).clear(); WS->getEventList(3).clear();
// Switch the event type // Switch the event type
for (size_t wi=0; wi < WS->getNumberHistograms(); wi++) if (makeDifferentTypes)
WS->getEventList(wi).switchTo(type); {
WS->getEventList(0).switchTo(TOF);
WS->getEventList(1).switchTo(WEIGHTED);
WS->getEventList(2).switchTo(WEIGHTED_NOTIME);
WS->getEventList(4).switchTo(WEIGHTED);
}
else
{
for (size_t wi=0; wi < WS->getNumberHistograms(); wi++)
WS->getEventList(wi).switchTo(type);
}
SaveNexusProcessed alg; SaveNexusProcessed alg;
alg.initialize(); alg.initialize();
...@@ -348,6 +358,11 @@ void testExec_EventWorkspace_WeightedEventNoTime() ...@@ -348,6 +358,11 @@ void testExec_EventWorkspace_WeightedEventNoTime()
do_testExec_EventWorkspaces(WEIGHTED_NOTIME); do_testExec_EventWorkspaces(WEIGHTED_NOTIME);
} }
void testExec_EventWorkspace_DifferentTypes()
{
do_testExec_EventWorkspaces(WEIGHTED_NOTIME, true);
}
void testExec_LoadedEventWorkspace() void testExec_LoadedEventWorkspace()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment