/[svn]/libgig/trunk/src/testcases/GigWriteTest.cpp
ViewVC logotype

Diff of /libgig/trunk/src/testcases/GigWriteTest.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 926 by schoenebeck, Thu Oct 19 19:01:13 2006 UTC revision 927 by schoenebeck, Tue Oct 24 14:30:47 2006 UTC
# Line 103  void GigWriteTest::createNewGigFile() { Line 103  void GigWriteTest::createNewGigFile() {
103          // also we assign a sample to each dimension region          // also we assign a sample to each dimension region
104          gig::Region* pRegion = pInstrument1->AddRegion();          gig::Region* pRegion = pInstrument1->AddRegion();
105          pRegion->SetSample(pSample1);          pRegion->SetSample(pSample1);
106            pRegion->KeyRange.low  = 0;
107            pRegion->KeyRange.high = 1;
108            pRegion->VelocityRange.low  = 0;
109            pRegion->VelocityRange.high = 1;
110            pRegion->KeyGroup = 0;
111          pRegion->pDimensionRegions[0]->pSample = pSample1;          pRegion->pDimensionRegions[0]->pSample = pSample1;
112    
113          pRegion = pInstrument2->AddRegion();          pRegion = pInstrument2->AddRegion();
114          pRegion->SetSample(pSample2);          pRegion->SetSample(pSample2);
115            pRegion->KeyRange.low  = 1;
116            pRegion->KeyRange.high = 2;
117            pRegion->VelocityRange.low  = 1;
118            pRegion->VelocityRange.high = 2;
119            pRegion->KeyGroup = 1;
120          pRegion->pDimensionRegions[0]->pSample = pSample2;          pRegion->pDimensionRegions[0]->pSample = pSample2;
121    
122          pRegion = pInstrument3->AddRegion();          pRegion = pInstrument3->AddRegion();
123          pRegion->SetSample(pSample3);          pRegion->SetSample(pSample3);
124            pRegion->KeyRange.low  = 2;
125            pRegion->KeyRange.high = 3;
126            pRegion->VelocityRange.low  = 2;
127            pRegion->VelocityRange.high = 3;
128            pRegion->KeyGroup = 2;
129          pRegion->pDimensionRegions[0]->pSample = pSample3;          pRegion->pDimensionRegions[0]->pSample = pSample3;
130    
131          pRegion = pInstrument4->AddRegion();          pRegion = pInstrument4->AddRegion();
132          pRegion->SetSample(pSample4);          pRegion->SetSample(pSample4);
133            pRegion->KeyRange.low  = 3;
134            pRegion->KeyRange.high = 4;
135            pRegion->VelocityRange.low  = 3;
136            pRegion->VelocityRange.high = 4;
137            pRegion->KeyGroup = 3;
138          pRegion->pDimensionRegions[0]->pSample = pSample4;          pRegion->pDimensionRegions[0]->pSample = pSample4;
139    
140          // save file ("physically") as of now          // save file ("physically") as of now
# Line 182  void GigWriteTest::testArticulationsOfCr Line 202  void GigWriteTest::testArticulationsOfCr
202              CPPUNIT_ASSERT(pRegion->DimensionRegions == 1);              CPPUNIT_ASSERT(pRegion->DimensionRegions == 1);
203              sOughtToBe = "Foo Sample " + ToString(iInstrument);              sOughtToBe = "Foo Sample " + ToString(iInstrument);
204              CPPUNIT_ASSERT(pRegion->GetSample()->pInfo->Name == sOughtToBe);              CPPUNIT_ASSERT(pRegion->GetSample()->pInfo->Name == sOughtToBe);
205                CPPUNIT_ASSERT(pRegion->KeyRange.low  == iInstrument - 1);
206                CPPUNIT_ASSERT(pRegion->KeyRange.high == iInstrument);
207                CPPUNIT_ASSERT(pRegion->VelocityRange.low  == iInstrument - 1);
208                CPPUNIT_ASSERT(pRegion->VelocityRange.high == iInstrument);
209                CPPUNIT_ASSERT(pRegion->KeyGroup  == iInstrument - 1);
210              gig::DimensionRegion* pDimensionRegion = pRegion->GetDimensionRegionByValue((uint[8]){0,0,0,0,0,0,0,0});              gig::DimensionRegion* pDimensionRegion = pRegion->GetDimensionRegionByValue((uint[8]){0,0,0,0,0,0,0,0});
211              CPPUNIT_ASSERT(pDimensionRegion);              CPPUNIT_ASSERT(pDimensionRegion);
212              CPPUNIT_ASSERT(pDimensionRegion->pSample->pInfo->Name == sOughtToBe);              CPPUNIT_ASSERT(pDimensionRegion->pSample->pInfo->Name == sOughtToBe);

Legend:
Removed from v.926  
changed lines
  Added in v.927

  ViewVC Help
Powered by ViewVC