DESC="Match a pointcut from a Aspect C++ repository"

REPOSDIR="repos dir"
REPOS="${REPOSDIR}/test18_repos.acp"
OBJDIR="obj dir"
OBJ="${OBJDIR}/Test03.o"

runtest()
{
  mkdir "${OBJDIR}"
  mkdir "${REPOSDIR}"

  EXEC="${AGCC} -v2 --repository \"${REPOS}\" --path ${TestSrcDir} -c -o \"${OBJ}\" ${TestSrcDir}/Test.cc"
  if  (eval ${EXEC});then true;else
    ERR_MSG="Execution failed: '${EXEC}'"
    return 1
  fi

  if [ ! -f "${OBJ}" ];then
    ERR_MSG="Object file '${OBJ}' was not created"
    return 1
  fi

  if [ ! -f "${REPOS}"  ];then
    return 1
    ERR_MSG="Repository file '${REPOS}' has not been created"
  fi

  EXEC="${AGCC} -v2 --repository \"${REPOS}\" --expr'\"% Test::%(...)\" && \"%\"'"
  if  (eval ${EXEC});then true;else
    ERR_MSG="Execution failed: '${EXEC}'"
    return 1
  fi
}
