mirror of
https://github.com/facebook/Haxl.git
synced 2024-12-23 16:53:02 +03:00
7cd98c4076
Summary: This diff adds the createMemo and updateMemo helper functions, which abstract the memoization reference management logic of cachedComputation. This separates the work of *how* a memoized computation is created/updated, from *where* the memo reference lives, allowing the same code to be used to manage request-scope and feature-scope memos simultaneously. A refactor of cachedComputation to use this abstraction is forthcoming. Reviewed By: simonmar Differential Revision: D3492803 fbshipit-source-id: 9dadd3860d5bec3bf776eef7c1bd610c25283729
32 lines
765 B
Haskell
32 lines
765 B
Haskell
{-# LANGUAGE CPP, OverloadedStrings #-}
|
|
module AllTests (allTests) where
|
|
|
|
import TestExampleDataSource
|
|
import BatchTests
|
|
import CoreTests
|
|
import DataCacheTest
|
|
#ifdef HAVE_APPLICATIVEDO
|
|
import AdoTests
|
|
#endif
|
|
#if __GLASGOW_HASKELL__ >= 710
|
|
import ProfileTests
|
|
#endif
|
|
import MemoizationTests
|
|
|
|
import Test.HUnit
|
|
|
|
allTests :: Test
|
|
allTests = TestList
|
|
[ TestLabel "ExampleDataSource" TestExampleDataSource.tests
|
|
, TestLabel "BatchTests" BatchTests.tests
|
|
, TestLabel "CoreTests" CoreTests.tests
|
|
, TestLabel "DataCacheTests" DataCacheTest.tests
|
|
#ifdef HAVE_APPLICATIVEDO
|
|
, TestLabel "AdoTests" AdoTests.tests
|
|
#endif
|
|
#if __GLASGOW_HASKELL__ >= 710
|
|
, TestLabel "ProfileTests" ProfileTests.tests
|
|
#endif
|
|
, TestLabel "MemoizationTests" MemoizationTests.tests
|
|
]
|