From d16cbbf604171092cb4eb5549d275966196f0b8d Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Sat, 5 Dec 2020 00:08:12 -0600 Subject: fix(hfpm): dependence on library mod files --- bootstrap/unit_test/ModuleToCompileInfoTest.hs | 11 +++++++---- bootstrap/unit_test/ProgramToCompileInfoTest.hs | 11 +++++++---- bootstrap/unit_test/SubmoduleToCompileInfoTest.hs | 11 +++++++---- 3 files changed, 21 insertions(+), 12 deletions(-) (limited to 'bootstrap/unit_test') diff --git a/bootstrap/unit_test/ModuleToCompileInfoTest.hs b/bootstrap/unit_test/ModuleToCompileInfoTest.hs index 5a1f0a8..08cd67c 100644 --- a/bootstrap/unit_test/ModuleToCompileInfoTest.hs +++ b/bootstrap/unit_test/ModuleToCompileInfoTest.hs @@ -3,7 +3,8 @@ module ModuleToCompileInfoTest ) where -import BuildModel ( CompileTimeInfo(..) +import BuildModel ( AvailableModule(..) + , CompileTimeInfo(..) , Source(..) , constructCompileTimeInfo ) @@ -43,10 +44,12 @@ exampleModule = Module moduleSourceFileName' :: FilePath moduleSourceFileName' = "some" "file" "somewhere.f90" -availableModules :: [String] -availableModules = ["module1", "module3"] +availableModules :: [AvailableModule] +availableModules = [ AvailableModule {availableModuleName = "module1", availableModuleFile = "build_dir" "module1.mod"} + , AvailableModule {availableModuleName = "module3", availableModuleFile = "build_dir" "module3.mod"} + ] -doCompileTimeTransformation :: (Source, [String]) -> CompileTimeInfo +doCompileTimeTransformation :: (Source, [AvailableModule]) -> CompileTimeInfo doCompileTimeTransformation (programSource, otherSources) = constructCompileTimeInfo programSource otherSources "build_dir" diff --git a/bootstrap/unit_test/ProgramToCompileInfoTest.hs b/bootstrap/unit_test/ProgramToCompileInfoTest.hs index f17a3df..a9ad39b 100644 --- a/bootstrap/unit_test/ProgramToCompileInfoTest.hs +++ b/bootstrap/unit_test/ProgramToCompileInfoTest.hs @@ -3,7 +3,8 @@ module ProgramToCompileInfoTest ) where -import BuildModel ( CompileTimeInfo(..) +import BuildModel ( AvailableModule(..) + , CompileTimeInfo(..) , Source(..) , constructCompileTimeInfo ) @@ -42,10 +43,12 @@ exampleProgram = Program programSourceFileName' :: FilePath programSourceFileName' = "some" "file" "somewhere.f90" -availableModules :: [String] -availableModules = ["module1", "module3"] +availableModules :: [AvailableModule] +availableModules = [ AvailableModule {availableModuleName = "module1", availableModuleFile = "build_dir" "module1.mod"} + , AvailableModule {availableModuleName = "module3", availableModuleFile = "build_dir" "module3.mod"} + ] -doCompileTimeTransformation :: (Source, [String]) -> CompileTimeInfo +doCompileTimeTransformation :: (Source, [AvailableModule]) -> CompileTimeInfo doCompileTimeTransformation (programSource, otherSources) = constructCompileTimeInfo programSource otherSources "build_dir" diff --git a/bootstrap/unit_test/SubmoduleToCompileInfoTest.hs b/bootstrap/unit_test/SubmoduleToCompileInfoTest.hs index d5d3ad8..621b0d5 100644 --- a/bootstrap/unit_test/SubmoduleToCompileInfoTest.hs +++ b/bootstrap/unit_test/SubmoduleToCompileInfoTest.hs @@ -3,7 +3,8 @@ module SubmoduleToCompileInfoTest ) where -import BuildModel ( CompileTimeInfo(..) +import BuildModel ( AvailableModule(..) + , CompileTimeInfo(..) , Source(..) , constructCompileTimeInfo ) @@ -45,10 +46,12 @@ exampleSubmodule = Submodule submoduleSourceFileName' :: FilePath submoduleSourceFileName' = "some" "file" "somewhere.f90" -availableModules :: [String] -availableModules = ["module1", "module3"] +availableModules :: [AvailableModule] +availableModules = [ AvailableModule {availableModuleName = "module1", availableModuleFile = "build_dir" "module1.mod"} + , AvailableModule {availableModuleName = "module3", availableModuleFile = "build_dir" "module3.mod"} + ] -doCompileTimeTransformation :: (Source, [String]) -> CompileTimeInfo +doCompileTimeTransformation :: (Source, [AvailableModule]) -> CompileTimeInfo doCompileTimeTransformation (programSource, otherSources) = constructCompileTimeInfo programSource otherSources "build_dir" -- cgit v1.2.3