Skip to content

Commit

Permalink
❗ [fix]: Remove trailing line terminator from compute-dtw expect.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolyp committed Oct 25, 2023
1 parent a6cc71f commit 8026595
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion fluid/example/slicing/dtw/compute-dtw.expect.fld
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ let seq1 = ⸨[⸩ ⸨3⸩ ⸨,⸩ ⸨1⸩ ⸨,⸩ 2 ⸨,⸩ 2 ⸨,⸩ 1 ⸨]⸩
seq2 = ⸨[⸩ ⸨2⸩ ⸨,⸩ ⸨0⸩ ⸨,⸩ ⸨0⸩ ⸨,⸩ 3 ⸨,⸩ 3 ⸨,⸩ 1 ⸨,⸩ 0 ⸨]⸩;
window = ⸨2⸩;
(costs, matched) = computeDTW seq1 seq2 d window in
matched
matched
22 changes: 10 additions & 12 deletions test/Main.purs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
module Test.Main where

import Prelude hiding (add)

import App.Util.Select (listElement)
import Data.Array (concat)
import Data.Profunctor.Strong (second)
import Effect (Effect)
import Effect.Aff (Aff)
import Lattice (neg)
import Test.Specs (bwd_cases, desugar_cases, graphics_cases, linking_cases, misc_cases)
import Test.Util.Many (bwdMany, linkMany, many, withDatasetMany)
import Test.Util.Mocha (run)
Expand All @@ -14,28 +17,23 @@ main :: Effect Unit
main = run tests

tests :: Array (String × Aff Unit)
{-
tests = concat
[ test_desugaring
, test_misc
, test_bwd
, test_graphics
, test_linking
]

{-
tests = concat [ test_scratchpad ]
-}
tests = concat [ test_scratchpad ]

test_scratchpad :: Array (String × Aff Unit)
test_scratchpad = second void <$> many
[ { file: "slicing/dtw/matrix-update"
, fwd_expect:
"(FNum 0, Infty, Infty, Infty, Infty, Infty, Infty, Infty,\n\
\ Infty, FNum 1, FNum 10, FNum 19, Infty, Infty, Infty, Infty,\n\
\ Infty, FNum 2, FNum 2, FNum 3, FNum 7, Infty, Infty, Infty,\n\
\ Infty, FNum 2, FNum 6, FNum 6, FNum 4, FNum 5, Infty, Infty,\n\
\ Infty, Infty, FNum 6, FNum 10, FNum 5, FNum 5, FNum 6, Infty,\n\
\ Infty, Infty, Infty, FNum 7, FNum 9, FNum 9, FNum 5, FNum 6, ((1, 1) : ((2, 2) : ((2, 3) : ((3, 4) : ((4, 5) : ((5, 6) : ((5, 7) : []))))))))"
test_scratchpad = second void <$> bwdMany
[ { file: "dtw/compute-dtw"
, file_expect: "dtw/compute-dtw.expect"
, fwd_expect: "((1, 1) : ((2, 2) : ((2, 3) : ((3, 4) : ((4, 5) : ((5, 6) : ((5, 7) : [])))))))"
, δv: listElement 1 neg
}
]
(1 × false)
Expand Down
2 changes: 1 addition & 1 deletion test/Util.purs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test file progCxt tconfig (n × is_bench) = do
testPretty s
_ × row_accum <- runWriterT
( replicateM n $ do
testTrace s gconfig.γ tconfig
-- testTrace s gconfig.γ tconfig
testGraph s gconfig tconfig is_bench
)
pure $ row_accum `divRow` n
Expand Down

0 comments on commit 8026595

Please sign in to comment.