1
1
mirror of https://github.com/github/semantic.git synced 2025-01-09 00:56:32 +03:00

Add VarDecl/VarAssignment cases to Diff.Arbitrary

This commit is contained in:
joshvera 2016-06-14 17:43:42 -07:00
parent 79fb347748
commit df489c8ef2

View File

@ -72,5 +72,6 @@ instance (Eq leaf, Eq annotation, Arbitrary leaf, Arbitrary annotation) => Arbit
Assignment assignmentId value -> Assignment <$> shrink assignmentId <*> shrink value
Syntax.Args args -> Syntax.Args <$> (List.subsequences args >>= recursivelyShrink)
Syntax.MemberAccess memberId property -> Syntax.MemberAccess <$> shrink memberId <*> shrink property
Syntax.If cond ifExpr elseExpr -> Syntax.If <$> shrink cond <*> shrink ifExpr <*> shrink elseExpr
Syntax.VarDecl decl -> Syntax.VarDecl <$> shrink decl
Syntax.VarAssignment varId value -> Syntax.VarAssignment <$> shrink varId <*> shrink value
Pure patch -> ArbitraryDiff . Pure <$> shrink patch