diff options
| author | Mistivia <i@mistivia.com> | 2025-05-23 12:09:41 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-05-23 12:09:41 +0800 |
| commit | ff41a2a1b251e15aa613f3428906a1fc34e34e66 (patch) | |
| tree | aece9e1698de252cb0417ae32b15e7d3eb615796 /test | |
| parent | f52f1356b74adb4fa0b57f63d4944ebb442810f9 (diff) | |
fix composability bug
Diffstat (limited to 'test')
| -rw-r--r-- | test/AccessorTest.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/AccessorTest.hs b/test/AccessorTest.hs index 861a7a4..39a619a 100644 --- a/test/AccessorTest.hs +++ b/test/AccessorTest.hs @@ -25,6 +25,13 @@ testListSet_3 = TestCase (assertEqual "list set 3" expect result) where in over (_1 #> self) (+1) lst expect = [[1,2,3],[5,6,7],[7,8,9]] +testListSet_4 :: Test +testListSet_4 = TestCase (assertEqual "list set 4" expect result) where + result = + let lst = [[[1,2,3],[4,5,6],[7,8,9]]] :: [[[Int]]] + in set (_0 # _1 # _1) 42 lst + expect = [[[1,2,3],[4,42,6],[7,8,9]]] + testTuple_1 :: Test testTuple_1 = TestCase (assertEqual "tuple 1" expect result) where result = view (self #> sndAcc) $ Just (1 :: Int, 42 :: Int) |
