@@ -51,6 +51,7 @@ jsonSpec = do
51
51
-- DataTypesJSON
52
52
prop " MarkedString" (propertyJsonRoundtrip :: MarkedString -> Property )
53
53
prop " MarkupContent" (propertyJsonRoundtrip :: MarkupContent -> Property )
54
+ prop " TextDocumentContentChangeEvent" (propertyJsonRoundtrip :: TextDocumentContentChangeEvent -> Property )
54
55
prop " WatchedFiles" (propertyJsonRoundtrip :: DidChangeWatchedFilesRegistrationOptions -> Property )
55
56
prop " ResponseMessage Hover"
56
57
(propertyJsonRoundtrip :: TResponseMessage 'Method_TextDocumentHover -> Property )
@@ -96,6 +97,7 @@ instance Arbitrary Null where
96
97
97
98
instance (R. AllUniqueLabels r , R. Forall r Arbitrary ) => Arbitrary (R. Rec r ) where
98
99
arbitrary = R. fromLabelsA @ Arbitrary $ \ _l -> arbitrary
100
+ shrink record = R. traverse @ Arbitrary @ [] shrink record
99
101
100
102
deriving newtype instance Arbitrary MarkedString
101
103
@@ -124,6 +126,7 @@ deriving newtype instance Arbitrary GlobPattern
124
126
125
127
instance Arbitrary Position where
126
128
arbitrary = Position <$> arbitrary <*> arbitrary
129
+ shrink (Position s e) = [ Position s' e' | s' <- shrink s, e' <- shrink e ]
127
130
128
131
instance Arbitrary Location where
129
132
arbitrary = Location <$> arbitrary <*> arbitrary
@@ -182,3 +185,6 @@ instance Arbitrary WatchKind where
182
185
arbitrary = oneof [pure WatchKind_Change , pure WatchKind_Create , pure WatchKind_Delete ]
183
186
184
187
-- ---------------------------------------------------------------------
188
+ --
189
+ instance Arbitrary TextDocumentContentChangeEvent where
190
+ arbitrary = TextDocumentContentChangeEvent <$> arbitrary
0 commit comments