  SUBROUTINE indivTest(testInfo)
! Check each individual test whose expected result is finite
! with the value returned by the oracle code which is used
! to obtain accurate results within the performance tests.
  TYPE (testInfoType), INTENT (INOUT), TARGET :: testInfo
    
  CALL checkTrue(testInfo)

  END SUBROUTINE indivTest
  
  SUBROUTINE checkTrue(testInfo)
  USE oracle, ONLY: vecOracle, Errors
  USE checkTests, ONLY: outputRes
  TYPE(testInfoType), INTENT(IN), TARGET :: testInfo
!
! Routine to check that the `true' value provided for each 
! test case matches the value computed by the oracle routine
! to full accuracy. This check is only applied when the
! expected result is a finite value. If the underlying
! floating-point arithmetic and transfer routines are working
! correctly we should expect a match to the last bit; i.e.,
! ulps should return zero.
!
  REAL(wp), POINTER :: x(:)
  REAL(skind) :: ulps, relErr
  REAL(wp) :: expRes
  REAL(wp), ALLOCATABLE :: y(:)
  INTEGER :: n, incx

  expRes = testInfo%expectedNorm

  IF (ieee_is_finite(expres)) THEN
    x => testInfo%inVector
    n = testInfo%nVal
    incx = testInfo%incxVal

    IF (n <= 0 .OR. incx <= 0) RETURN

    ALLOCATE(y(n))
    y(1:n) = x(1:(n-1)*incx+1:incx)
    CALL vecOracle(y)
    DEALLOCATE(y)
    CALL Errors(expRes, relErr, ulps)

    IF (ulps /= 0) THEN
      WRITE(*, '(''Test number: '', i4)') testInfo%testNo
      WRITE(*, '(a)') testInfo%testdescript 
      WRITE(*, '(''*** Given true value /= computed oracle value ***'')')
      WRITE(*, ADVANCE='no',fmt='(''True value: '')')
      CALL outputRes(expRes)
      WRITE(*, *)
      WRITE(*, ADVANCE='no',fmt='(''Relative error: '', e12.4)') relErr
      WRITE(*, *)
      WRITE(*, ADVANCE='no',fmt='(''Error in ulps: '',e12.4)') ulps
      WRITE(*, *)
    END IF
  END IF
  END SUBROUTINE checkTrue


