1{-# LANGUAGE ConstraintKinds, GADTs, RankNTypes, FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
8 , module Reflex.TestPlan
16import Reflex.Plan.Pure
17import Reflex.Plan.Reflex
22import Data.IntMap (IntMap)
30testAgreement :: TestCase -> IO Bool
31testAgreement (TestE p) = do
32 spider <- runSpiderHost $ runTestE p
33 let results = [("spider", spider)]
35 compareResult results (testEvent $ runPure p)
37testAgreement (TestB p) = do
38 spider <- runSpiderHost $ runTestB p
39 let results = [("spider", spider)]
41 compareResult results (testBehavior $ runPure p)
44compareResult :: (Show a, Eq a) => [(String, IntMap a)] -> IntMap a -> IO Bool
45compareResult results expected = fmap and $ forM results $ \(name, r) -> do
47 when (r /= expected) $ do
48 putStrLn ("Got: " ++ show (name, r))
49 putStrLn ("Expected: " ++ show expected)
50 return (r == expected)
53runTests :: [(String, TestCase)] -> IO ()
54runTests testCases = do
55 results <- forM testCases $ \(name, test) -> do
56 putStrLn $ "Test: " <> name
58 exitWith $ if and results
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list