Skip to content

Commit

Permalink
Add some comments to unit tests. Refs #6348.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Jan 23, 2013
1 parent 0ae387b commit 82cd4fc
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions Code/Mantid/Framework/Algorithms/test/FilterEventsTest.h
Expand Up @@ -28,6 +28,9 @@ class FilterEventsTest : public CxxTest::TestSuite
static void destroySuite( FilterEventsTest *suite ) { delete suite; }


//----------------------------------------------------------------------------------------------
/** Test initialization
*/
void test_Initialization()
{
FilterEvents alg;
Expand All @@ -36,6 +39,9 @@ class FilterEventsTest : public CxxTest::TestSuite
TS_ASSERT(alg.isInitialized());
}

//----------------------------------------------------------------------------------------------
/** Test create event workspace and splitters
*/
void test_CreatedEventWorskpaceAndSplitter()
{
DataObjects::EventWorkspace_sptr eventws = createEventWorkspace();
Expand All @@ -53,8 +59,8 @@ class FilterEventsTest : public CxxTest::TestSuite
return;
}

/*
* Filter events without any correction
//----------------------------------------------------------------------------------------------
/** Filter events without any correction
* (1) Leave correction file empty
* (2) Count events in each output including "-1", the excluded/unselected events
*/
Expand Down Expand Up @@ -120,20 +126,25 @@ class FilterEventsTest : public CxxTest::TestSuite
return;
}

void test_FilterWithCorrection()
void ToImplement_test_FilterWithCorrection()
{

}


/*
* Create an EventWorkspace. This workspace will have
* (1) Events with wall time even in time
//----------------------------------------------------------------------------------------------
/** Create an EventWorkspace. This workspace has
* (1) 10 detectors
* (2) Run starts @ 20000000000 seconds
* (3) Pulse length = 100*1000*1000 seconds
* (4) Within one pulse, two consecutive events/neutrons is apart for 10*1000*1000 seconds
* (5) "Experiment": 5 pulse times. 10 events in each pulse
*/
DataObjects::EventWorkspace_sptr createEventWorkspace()
{
// 1. Create an EventWorkspace with 10 detectors
DataObjects::EventWorkspace_sptr eventWS = WorkspaceCreationHelper::createEventWorkspaceWithFullInstrument(10, 1, true);
DataObjects::EventWorkspace_sptr eventWS =
WorkspaceCreationHelper::createEventWorkspaceWithFullInstrument(10, 1, true);

int64_t runstart_i64 = 20000000000;
Kernel::DateAndTime runstart(runstart_i64);
Expand Down Expand Up @@ -164,17 +175,18 @@ class FilterEventsTest : public CxxTest::TestSuite
}


/*
* Create a Splitter for output
* Region:
//----------------------------------------------------------------------------------------------
/** Create a Splitter for output
* Region:
* 0: pulse 0: 0 ~ 3+
* 1: pulse 0: 3+ ~ pulse 1: 9+
* 2: from pulse 2: 0 ~ 6+
* -1: from pulse 2: 6+ ~ 9+
*/
DataObjects::SplittersWorkspace_sptr createSplitter()
{
DataObjects::SplittersWorkspace_sptr splitterws = boost::shared_ptr<DataObjects::SplittersWorkspace>(new DataObjects::SplittersWorkspace);
DataObjects::SplittersWorkspace_sptr splitterws =
boost::shared_ptr<DataObjects::SplittersWorkspace>(new DataObjects::SplittersWorkspace);

int64_t runstart_i64 = 20000000000;

Expand Down

0 comments on commit 82cd4fc

Please sign in to comment.