From 078f4ca5af387ef39e331f2eb2d7f0df5ce6d720 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Tue, 20 Oct 2020 11:13:07 -0500 Subject: Add test for object file of program's compile time info --- bootstrap/unit_test/ProgramToCompileInfoTest.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bootstrap/unit_test') diff --git a/bootstrap/unit_test/ProgramToCompileInfoTest.hs b/bootstrap/unit_test/ProgramToCompileInfoTest.hs index b855c66..ca1f228 100644 --- a/bootstrap/unit_test/ProgramToCompileInfoTest.hs +++ b/bootstrap/unit_test/ProgramToCompileInfoTest.hs @@ -23,7 +23,9 @@ test = return $ givenInput [ whenTransformed "its compileTimeInfo is determined" doCompileTimeTransformation - [then' "it still knows the original source file" checkSourceFileName] + [ then' "it still knows the original source file" checkSourceFileName + , then' "it knows what object file will be produced" checkObjectFileName + ] ] exampleProgram :: Source @@ -46,3 +48,8 @@ doCompileTimeTransformation (programSource, otherSources) = checkSourceFileName :: CompileTimeInfo -> Result checkSourceFileName cti = assertEquals programSourceFileName' (compileTimeInfoSourceFileName cti) + +checkObjectFileName :: CompileTimeInfo -> Result +checkObjectFileName cti = assertEquals + ("build_dir" "some_file_somewhere.f90.o") + (compileTimeInfoObjectFileProduced cti) -- cgit v1.2.3