/* * Get the stop list index value. */ int FusionCDFProbeGroupInformation::GetStop() const { if (gcosGroup) return gcosGroup->GetStop(); else if (calvinGroup) { CDFProbeInformation probeInfo; calvinGroup->GetCell(calvinGroup->GetNumCells()-1, probeInfo); return probeInfo.GetListIndex(); } else return 0; }
void CDFFileReaderTest::CheckSmallCDFProbeSetInformation(int32_t index, CDFProbeSetInformation& psi) { // values expected in the file // u_int8_t unitType = 3; u_int32_t numGroups = 1; DirectionType direction = ProbeSenseDirection; u_int32_t numLists = 11; u_int8_t cellsPerList = 2; u_int32_t numCells = numLists*cellsPerList; wchar_t name[100]; FormatString1(name, 100, L"biob_%d", index); // Check the CDFProbeSetInformation // TODO: do we need to add a method to get unitType from CDFProbeSetInformation. It goes in but doesn't come out. CPPUNIT_ASSERT(psi.GetName() == name); CPPUNIT_ASSERT(direction == psi.GetDirection()); CPPUNIT_ASSERT(numLists == psi.GetNumLists()); CPPUNIT_ASSERT(numGroups == psi.GetNumGroups()); CPPUNIT_ASSERT(numCells == psi.GetNumCells()); CPPUNIT_ASSERT(cellsPerList == psi.GetNumCellsPerList()); CPPUNIT_ASSERT(index == psi.GetProbeSetNumber()); // Check the CDFProbeGroupInformation CDFProbeGroupInformation pgi; CPPUNIT_ASSERT_NO_THROW(psi.GetGroupInformation(0, pgi)); CPPUNIT_ASSERT(pgi.GetName() == name); CPPUNIT_ASSERT(direction == pgi.GetDirection()); CPPUNIT_ASSERT(numLists == pgi.GetNumLists()); CPPUNIT_ASSERT(numCells == pgi.GetNumCells()); CPPUNIT_ASSERT(cellsPerList == pgi.GetNumCellsPerList()); // Check the CDFProbeInformation CDFProbeInformation pi; for (u_int32_t list = 0; list < numLists; ++list) { u_int32_t startCell = list*cellsPerList; for (u_int32_t cellInList = 0; cellInList < cellsPerList; ++cellInList) { CPPUNIT_ASSERT_NO_THROW(pgi.GetCell(startCell+cellInList, pi)); CPPUNIT_ASSERT(pi.GetX() == list); CPPUNIT_ASSERT(pi.GetY() == index*cellsPerList+cellInList); CPPUNIT_ASSERT(pi.GetListIndex() == list); CPPUNIT_ASSERT(pi.GetExpos() == list); CPPUNIT_ASSERT(pi.GetPBase() == 'C'); CPPUNIT_ASSERT(pi.GetTBase() == 'G'); } } }