Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Valerii Butorin committed Apr 30, 2024
1 parent 6a61a5a commit ae753ce
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ main = do
conf <- case march of
Nothing -> return Nothing
Just path -> Just <$> parseConfig path

forM_ conf $ saveConfig output_path

let exactFrontendType = identifyFrontendType filename frontend_language
Expand Down
37 changes: 17 additions & 20 deletions test/NITTA/Model/Config/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import Test.Tasty.HUnit
tests =
testGroup
"Configuration parsing"
[ testCase "parse config common" $ do
conf <- parseConfig "examples/microarch.yml"
let
[ testCase "parse config common" $ do
conf <- parseConfig "examples/microarch.yml"
let
lib = fromJust $ library conf
fram = fromJust $ M.lookup (T.pack "fram{x}") lib
nets = networks conf
Expand All @@ -35,21 +35,18 @@ tests =
protos_ = fromJust $ protos net
shift = fromJust $ M.lookup (T.pack "shift{x}") protos_
div_ = fromJust $ M.lookup (T.pack "div{x}") protos_

"Sync" @=? show (ioSync conf)
True @=? mock conf
"fx32.32" @=? T.unpack (valueType conf)
2 @=? M.size (fromJust $ library conf)

32 @=? Conf.size fram
Just True @=? Conf.sRight shift
4 @=? Conf.pipeline div_

"mosi" @=? T.unpack (mosi spi)
"miso" @=? T.unpack (miso spi)
"sclk" @=? T.unpack (sclk spi)
"cs" @=? T.unpack (cs spi)
True @=? isSlave spi
Just 6 @=? bufferSize spi
0 @=? bounceFilter spi
"Sync" @=? show (ioSync conf)
True @=? mock conf
"fx32.32" @=? T.unpack (valueType conf)
2 @=? M.size (fromJust $ library conf)
32 @=? Conf.size fram
Just True @=? Conf.sRight shift
4 @=? Conf.pipeline div_
"mosi" @=? T.unpack (mosi spi)
"miso" @=? T.unpack (miso spi)
"sclk" @=? T.unpack (sclk spi)
"cs" @=? T.unpack (cs spi)
True @=? isSlave spi
Just 6 @=? bufferSize spi
0 @=? bounceFilter spi
]

0 comments on commit ae753ce

Please sign in to comment.