File: WithLocationSpec.hs

package info (click to toggle)
haskell-with-location 0.1.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 64 kB
  • sloc: haskell: 49; makefile: 5
file content (16 lines) | stat: -rw-r--r-- 387 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE CPP #-}
module Data.WithLocationSpec (spec) where

import           Test.Hspec

import           Data.WithLocation

spec :: Spec
spec = do
  describe "location" $ do
    it "returns a source location" $ do
#if MIN_VERSION_base(4,8,1)
      location `shouldBe` Just (Location "main" "Data.WithLocationSpec" __FILE__ __LINE__ 7)
#else
      location `shouldBe` Nothing
#endif