    MODULE sdTestMod
!
! This module contains two routines that run the complete
! test suite for double (runDpTests) and single (runSpTests0
! precision data. Each precision runs the suite using both
! real and complex input data vectors.
!
! The two include files have been constructed to be precision
! independent by using the KIND variable wp and setting this
! to be dkind and skind for the double and single precision
! tests respectively.

      USE, INTRINSIC :: ieee_arithmetic
      USE, INTRINSIC :: ieee_features
      USE, INTRINSIC :: ieee_exceptions
      USE set_precision

    CONTAINS

! Routine to run the double precision version of the test suite
! using both real and complex input vectors.
      SUBROUTINE runDpTests(realNrm2Function, complexNrm2Function)
      USE set_precision, ONLY: wp=>dkind
      USE checkTests, ONLY: nTests
      IMPLICIT NONE
      EXTERNAL realNrm2Function, complexNrm2Function
      REAL(dkind) :: realNrm2Function, complexNrm2Function
      INCLUDE 'sdTestMod.inc'
      INCLUDE 'indivTest.inc'
      END SUBROUTINE runDpTests

! Routine to run the single precision version of the test suite
! using both real and complex input vectors.
      SUBROUTINE runSpTests(realNrm2Function, complexNrm2Function)
      USE set_precision, ONLY: wp=>skind
      USE checkTests, ONLY: nTests
      IMPLICIT NONE
      EXTERNAL realNrm2Function, complexNrm2Function
      REAL(skind) :: realNrm2Function, complexNrm2Function
      INCLUDE 'sdTestMod.inc'
      INCLUDE 'indivTest.inc'
      END SUBROUTINE runSpTests

    END MODULE sdTestMod
