aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/unit_test
diff options
context:
space:
mode:
authorBrad Richardson <everythingfunctional@protonmail.com>2020-10-20 11:15:25 -0500
committerBrad Richardson <everythingfunctional@protonmail.com>2020-10-20 11:15:25 -0500
commit20ee2333cd86909e21ca5bd88f3d7166e1941c92 (patch)
treecb35e0d6840c0a3e6dee527467ede801b1efeea4 /bootstrap/unit_test
parent078f4ca5af387ef39e331f2eb2d7f0df5ce6d720 (diff)
downloadfpm-20ee2333cd86909e21ca5bd88f3d7166e1941c92.tar.gz
fpm-20ee2333cd86909e21ca5bd88f3d7166e1941c92.zip
Add test that program produces no other files
Diffstat (limited to 'bootstrap/unit_test')
-rw-r--r--bootstrap/unit_test/ProgramToCompileInfoTest.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/bootstrap/unit_test/ProgramToCompileInfoTest.hs b/bootstrap/unit_test/ProgramToCompileInfoTest.hs
index ca1f228..e16ab22 100644
--- a/bootstrap/unit_test/ProgramToCompileInfoTest.hs
+++ b/bootstrap/unit_test/ProgramToCompileInfoTest.hs
@@ -9,6 +9,7 @@ import BuildModel ( Source(..)
)
import Hedge ( Result
, Test
+ , assertEmpty
, assertEquals
, givenInput
, then'
@@ -25,6 +26,7 @@ test = return $ givenInput
doCompileTimeTransformation
[ then' "it still knows the original source file" checkSourceFileName
, then' "it knows what object file will be produced" checkObjectFileName
+ , then' "there are no other files produced" checkOtherFilesProduced
]
]
@@ -53,3 +55,7 @@ checkObjectFileName :: CompileTimeInfo -> Result
checkObjectFileName cti = assertEquals
("build_dir" </> "some_file_somewhere.f90.o")
(compileTimeInfoObjectFileProduced cti)
+
+checkOtherFilesProduced :: CompileTimeInfo -> Result
+checkOtherFilesProduced cti =
+ assertEmpty (compileTimeInfoOtherFilesProduced cti)