示例#1
0
文件: Fixture.cpp 项目: juherr/fit
  VALUE<CELLADAPTER> ceefit_call_spec FIXTURE::FindMethod(PTR<FIXTURE>& targetFixture, const STRING& name)
  {
    targetFixture = this->GetTargetClass();

    CELLADAPTER* retVal = null;
    PTR<CELLADAPTER> aMethod(targetFixture->TestList.GetHead());
    while(aMethod != null)
    {
      FITTESTBASE* methodPtr = dynamic_cast<FITTESTBASE*>(aMethod.GetPointer());
      if(aMethod->IsMethod() && aMethod->GetName().IsEqual(name) && methodPtr != null && methodPtr->GetParameterCount() == 0)
      {
        retVal = aMethod.GetPointer();
      }
      aMethod = dynamic_cast<SLINK<CELLADAPTER>*>(aMethod.GetPointer())->GetNext();
    }
    
    return(VALUE<CELLADAPTER>(retVal));
  }
int main(void)
{
  aMethod();
  return 0;
}