From 33bce0badbeb834cf8c584df56c424fe1c9bff7a Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sat, 8 Jun 2024 00:22:17 +0200 Subject: quasi-quotes for config keys --- test/Main.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/Main.hs') diff --git a/test/Main.hs b/test/Main.hs index 1af3d9a..2b96ac9 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -3,6 +3,7 @@ {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ApplicativeDo #-} +{-# LANGUAGE QuasiQuotes #-} module Main (main) where import Conftrack @@ -87,15 +88,16 @@ prop_aeson_nested = roundtripVia nestedToJson prop_flat_keys :: Property prop_flat_keys = monadicIO $ do keys <- run $ configKeysOf @TestFlat - assert (null (keys \\ [ Key ["foo"], Key ["bar"] ])) + assert (null (keys \\ [ [key|foo|], [key|bar|] ])) prop_nested_keys :: Property prop_nested_keys = monadicIO $ do keys <- run $ configKeysOf @TestNested - assert (null (keys \\ [ Key ["foo"], Key ["nested", "bar"], Key ["nested", "foo"] ])) + assert (null (keys \\ [ [key|foo|], [key|nested.bar|], [key|nested.foo|] ])) -- see quickcheck docs for why this return is here return [] +runTests :: IO Bool runTests = $quickCheckAll main :: IO () -- cgit v1.2.3