File: CondFmtTests.hs

package info (click to toggle)
haskell-xlsx 1.1.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 860 kB
  • sloc: haskell: 12,602; makefile: 6
file content (24 lines) | stat: -rw-r--r-- 581 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}

module CondFmtTests
  ( tests
  ) where

import Test.Tasty (testGroup, TestTree)
import Test.Tasty.SmallCheck (testProperty)

import Codec.Xlsx
import Codec.Xlsx.Parser.Internal
import Codec.Xlsx.Writer.Internal

import Common
import Test.SmallCheck.Series.Instances ()

tests :: TestTree
tests =
  testGroup
    "Types.ConditionalFormatting tests"
    [ testProperty "fromCursor . toElement == id" $ \(cFmt :: CfRule) ->
        [cFmt] == fromCursor (cursorFromElement $ toElement (n_ "cfRule") cFmt)
    ]