Skip to content

Commit b54efb3

Browse files
committed
fixup! Remove getHspecFormattedConfig which is no longer used.
1 parent 18b4045 commit b54efb3

File tree

1 file changed

+0
-67
lines changed

1 file changed

+0
-67
lines changed

hls-test-utils/src/Test/Hls/Util.hs

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ import Data.Bool (bool)
5151
import Data.Default
5252
import Data.List (intercalate)
5353
import Data.List.Extra (find)
54-
import Data.Maybe
5554
import qualified Data.Set as Set
5655
import qualified Data.Text as T
5756
import Development.IDE (GhcVersion(..), ghcVersion)
@@ -166,72 +165,6 @@ hieYamlCradleDirectContents = unlines
166165
]
167166

168167

169-
-- ---------------------------------------------------------------------
170-
171-
-- | A Hspec formatter for CircleCI.
172-
-- Originally from https://github.com/LeastAuthority/hspec-jenkins
173-
xmlFormatter :: Formatter
174-
xmlFormatter = silent {
175-
headerFormatter = do
176-
writeLine "<?xml version='1.0' encoding='UTF-8'?>"
177-
writeLine "<testsuite>"
178-
, exampleSucceeded
179-
, exampleFailed
180-
, examplePending
181-
, footerFormatter = writeLine "</testsuite>"
182-
}
183-
where
184-
185-
#if MIN_VERSION_hspec(2,5,0)
186-
exampleSucceeded path _ =
187-
#else
188-
exampleSucceeded path =
189-
#endif
190-
writeLine $ renderMarkup $ testcase path ""
191-
192-
#if MIN_VERSION_hspec(2,5,0)
193-
exampleFailed path _ err =
194-
#else
195-
exampleFailed path (Left err) =
196-
writeLine $ renderMarkup $ testcase path $
197-
failure ! message (show err) $ ""
198-
exampleFailed path (Right err) =
199-
#endif
200-
writeLine $ renderMarkup $ testcase path $
201-
failure ! message (reasonAsString err) $ ""
202-
203-
#if MIN_VERSION_hspec(2,5,0)
204-
examplePending path _ reason =
205-
#else
206-
examplePending path reason =
207-
#endif
208-
writeLine $ renderMarkup $ testcase path $
209-
case reason of
210-
Just desc -> skipped ! message desc $ ""
211-
Nothing -> skipped ""
212-
213-
failure, skipped :: Markup -> Markup
214-
failure = customParent "failure"
215-
skipped = customParent "skipped"
216-
217-
name, className, message :: String -> Attribute
218-
name = customAttribute "name" . stringValue
219-
className = customAttribute "classname" . stringValue
220-
message = customAttribute "message" . stringValue
221-
222-
testcase :: Path -> Markup -> Markup
223-
testcase (xs,x) = customParent "testcase" ! name x ! className (intercalate "." xs)
224-
225-
reasonAsString :: FailureReason -> String
226-
reasonAsString NoReason = "no reason given"
227-
reasonAsString (Reason x) = x
228-
reasonAsString (ExpectedButGot Nothing expected got) = "Expected " ++ expected ++ " but got " ++ got
229-
reasonAsString (ExpectedButGot (Just src) expected got) = src ++ " expected " ++ expected ++ " but got " ++ got
230-
#if MIN_VERSION_hspec(2,5,0)
231-
reasonAsString (Error Nothing err ) = show err
232-
reasonAsString (Error (Just s) err) = s ++ show err
233-
#endif
234-
235168
-- ---------------------------------------------------------------------
236169

237170
flushStackEnvironment :: IO ()

0 commit comments

Comments
 (0)