Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Derive.Cache_test

Contents

Synopsis

other functions

cached generators

make

toplevel_rederived :: Bool -> Text Source #

The toplevel block is just about always damaged.

extract

r_cache_logs :: Result -> [String] Source #

Extract cache logs so I can tell who rederived and who used the cache. I use strings instead of parsing it into structured data because strings make more informative errors when they don't match.

r_block_logs :: Result -> [String] Source #

Sometimes the cache msgs for the track cache are just clutter.

r_logs :: Result -> [Log.Msg] Source #

The logs are sorted for tests, since log order isn't really defined.

r_cache_collect :: Result -> [(String, Maybe Collect)] Source #

Pull the collects out of the cache, pairing them up with the cache keys.

run

compare_cached :: Ui.StateId BlockId -> Ui.StateId a -> (Result, Result, Result) Source #

Derive with and without the cache, and make sure the cache fired and the results are the same. Returns (result before modification, cached, uncached). The pre-modification result is occasionally useful to check logs.

run_cached :: BlockId -> Result -> Ui.State -> Ui.StateId a -> Result Source #

Run a derive after some modifications with the cache from a previous derive.

expect_no_events :: [Either DiffEvent DiffEvent] Source #

diff_events returns this when there were no events to diff.

type DiffEvent = (RealTime, RealTime, String, Double) Source #

(start, dur, pitch, initial_dyn)