diff options
author | Brad Richardson <everythingfunctional@protonmail.com> | 2020-10-14 12:59:06 -0500 |
---|---|---|
committer | Brad Richardson <everythingfunctional@protonmail.com> | 2020-10-14 12:59:06 -0500 |
commit | 0a0b3ec5a27d198832023ef5822087beb1ed860f (patch) | |
tree | dc4f5244879b15d8ee1cbba266a363b3530e51d7 /bootstrap/unit_test | |
parent | 39a50415f7f8d69b5393c7116ba3a70077583209 (diff) | |
download | fpm-0a0b3ec5a27d198832023ef5822087beb1ed860f.tar.gz fpm-0a0b3ec5a27d198832023ef5822087beb1ed860f.zip |
Clean up unit tests a bit
Diffstat (limited to 'bootstrap/unit_test')
-rw-r--r-- | bootstrap/unit_test/SourceConstructionTest.hs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/bootstrap/unit_test/SourceConstructionTest.hs b/bootstrap/unit_test/SourceConstructionTest.hs index 2cee008..24122c5 100644 --- a/bootstrap/unit_test/SourceConstructionTest.hs +++ b/bootstrap/unit_test/SourceConstructionTest.hs @@ -46,18 +46,16 @@ programSourceFileName' :: String programSourceFileName' = "some" </> "file" </> "somewhere.f90" checkIsProgram :: Source -> Result -checkIsProgram s = assertThat $ case s of - Program{} -> True - _ -> False +checkIsProgram Program{} = assertThat True +checkIsProgram _ = assertThat False checkProgramSourceFileName :: Source -> Result -checkProgramSourceFileName s = case s of - p@(Program{}) -> - assertEquals programSourceFileName' $ programSourceFileName p - _ -> fail' "wasn't a Program" +checkProgramSourceFileName p@(Program{}) = + assertEquals programSourceFileName' $ programSourceFileName p +checkProgramSourceFileName _ = fail' "wasn't a Program" checkProgramObjectFileName :: Source -> Result -checkProgramObjectFileName s = case s of - p@(Program{}) -> assertEquals ("." </> "some_file_somewhere.f90.o") +checkProgramObjectFileName p@(Program{}) = + assertEquals ("." </> "some_file_somewhere.f90.o") $ (programObjectFileName p) "." - _ -> fail' "wasn't a Program" +checkProgramObjectFileName _ = fail' "wasn't a Program" |