graphql-engine/server/src-test/Data/NonNegativeIntSpec.hs
Robert c1bdc99334 Fix comment formatting to allow parsing in haddock-mode
This is just a one-off fix, based on running ormolu across
the code base, which uses GHC's parser in haddock mode.

### Description

Fixes several instances of illegal haddock comments.

### Related Issues

#1679

### Steps to test and verify

Run ormolu over the codebase. Prior to this change, it complains that it
can't parse certain files due to malformed Haddock comments, after it
doesn't (there are still some other errors).

### Limitations, known bugs & workarounds

This doesn't ensure that we don't introduce similar issues in the future;
that'll be dealt with once we implement #1679.

#### Breaking changes

- [x] No Breaking changes, only touches code comments

https://github.com/hasura/graphql-engine-mono/pull/2010

GitOrigin-RevId: 7fbab0325ce13a16a04ff98d351f1af768e25d7c
2021-08-16 22:20:25 +00:00

22 lines
585 B
Haskell

-- | basic tests on NonNegativeIntType
module Data.NonNegativeIntSpec (spec) where
import Prelude
import Hasura.RQL.Types.Common (mkNonNegativeInt)
import Test.Hspec (Spec, describe, it, shouldBe)
spec :: Spec
spec = do
nonNegIntSpec
nonNegIntSpec :: Spec
nonNegIntSpec =
describe "non negative integer type" $ do
it "only validates non negative integers" $ do
mkNonNegativeInt 23 `shouldBe` Just 23
mkNonNegativeInt (-23) `shouldBe` Nothing
-- TODO: add spec for fromJSON for NonNegativeInt type