-- Do not edit! Automatically created with doctest-extract from src/Numeric/BLAS/Matrix/RowMajor/Square.hs
{-# LINE 32 "src/Numeric/BLAS/Matrix/RowMajor/Square.hs" #-}

module Test.ComplexDouble.Numeric.BLAS.Matrix.RowMajor.Square where

import qualified Test.DocTest.Driver as DocTest

{-# LINE 33 "src/Numeric/BLAS/Matrix/RowMajor/Square.hs" #-}
import     Test.ComplexDouble.Numeric.BLAS.Vector (forVector, Number_, number_)
import     Test.Slice (ShapeInt, shapeInt)
import     qualified Numeric.BLAS.Matrix.RowMajor.Square as Square
import     qualified Numeric.BLAS.Vector as Vector
import     Numeric.BLAS.Vector (Vector)
import     qualified Test.QuickCheck as QC
import     Test.QuickCheck ((===))

maxDim     :: Int
maxDim     = 10

test :: DocTest.T ()
test = do
 DocTest.printPrefix "Numeric.BLAS.Matrix.RowMajor.Square:72: "
{-# LINE 72 "src/Numeric/BLAS/Matrix/RowMajor/Square.hs" #-}
 DocTest.property(
{-# LINE 72 "src/Numeric/BLAS/Matrix/RowMajor/Square.hs" #-}
        
   QC.forAll (fmap shapeInt $ QC.choose (0,maxDim)) $ \sh ->
   Square.identity sh
   ===
   Square.diagonal (Vector.one sh :: Vector ShapeInt Number_)
  )
 DocTest.printPrefix "Numeric.BLAS.Matrix.RowMajor.Square:99: "
{-# LINE 99 "src/Numeric/BLAS/Matrix/RowMajor/Square.hs" #-}
 DocTest.property(
{-# LINE 99 "src/Numeric/BLAS/Matrix/RowMajor/Square.hs" #-}
        
   forVector number_ $ \xs ->
   xs === Square.takeDiagonal (Square.diagonal xs)
  )