Ejemplo n.º 1
0
def setGetBoundarySpeciesConcentrations (testId):
  print string.ljust ("Check " + testId, rpadding),
  errorFlag = False
  getArray = rrPython.getBoundarySpeciesConcentrations()
  setArray = zeros(len(getArray))
  for i in range(len(getArray)):
      value = random.random()*10
      setArray[i] = value
  rrPython.setBoundarySpeciesConcentrations (rrPython.PythonArrayTorrVector (setArray))
  if (setArray != rrPython.getBoundarySpeciesConcentrations()).all():
      errorFlag = True
  print passMsg (errorFlag)
Ejemplo n.º 2
0
def checkBoundarySpeciesConcentrations(testId):
    print string.ljust("Check " + testId, rpadding),
    errorFlag = False
    ss = rrPython.getBoundarySpeciesConcentrations()
    words = readLine().split()
    for i in range(len(ss)):
        if expectApproximately(float(words[i]), ss[i], 1E-6) == False:
            errorFlag = True
            break
    print passMsg(errorFlag)
Ejemplo n.º 3
0
def checkBoundarySpeciesConcentrations(testId):
  print string.ljust ("Check " + testId, rpadding),
  errorFlag = False
  ss = rrPython.getBoundarySpeciesConcentrations()
  words = readLine().split()
  for i in range (len (ss)):
       if expectApproximately(float (words[i]), ss[i], 1E-6) == False:
          errorFlag = True
          break;
  print passMsg (errorFlag)