Skip to content

Commit 059393c

Browse files
committed
tests: ReduceExprTests: m refactor
1 parent 7cdeab9 commit 059393c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/ReduceExprTests.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
22
module ReduceExprTests (tests) where
3-
import Data.Fix
43
import Test.Tasty
54
import Test.Tasty.HUnit
65

7-
import Nix.Atoms
86
import Nix.Expr.Types
97
import Nix.Expr.Types.Annotated
108
import Nix.Parser
119
import Nix.Reduce ( reduceExpr )
10+
import Nix.Expr.Shorthands
1211

1312

1413
tests :: TestTree
@@ -46,13 +45,13 @@ selectBasic :: Result NExprLoc
4645
selectBasic = parseNixTextLoc "{b=2;a=42;}.a"
4746

4847
selectBasicExpect :: NExpr
49-
selectBasicExpect = Fix . NConstant $ NInt 42
48+
selectBasicExpect = mkInt 42
5049

5150
selectNested :: Result NExprLoc
5251
selectNested = parseNixTextLoc "{a={b=2;a=42;};b={a=2;};}.a.a"
5352

5453
selectNestedExpect :: NExpr
55-
selectNestedExpect = Fix . NConstant $ NInt 42
54+
selectNestedExpect = mkInt 42
5655

5756
selectIncorrectAttrPath :: Result NExprLoc
5857
selectIncorrectAttrPath = parseNixTextLoc "{a=42;}.b"

0 commit comments

Comments
 (0)