From d9dc9f2ae5f196c15a7d35cddabc805c40ff86ce Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Wed, 31 Mar 2021 16:13:58 +0200 Subject: Phase out Haskell fpm (#420) - remove bootstrap directory from repository - remove stack-build from CI workflow - move Fortran fpm to project root - adjust install script and bootstrap instructions --- bootstrap/unit_test/ProgramToCompileInfoTest.hs | 71 ------------------------- 1 file changed, 71 deletions(-) delete mode 100644 bootstrap/unit_test/ProgramToCompileInfoTest.hs (limited to 'bootstrap/unit_test/ProgramToCompileInfoTest.hs') diff --git a/bootstrap/unit_test/ProgramToCompileInfoTest.hs b/bootstrap/unit_test/ProgramToCompileInfoTest.hs deleted file mode 100644 index a9ad39b..0000000 --- a/bootstrap/unit_test/ProgramToCompileInfoTest.hs +++ /dev/null @@ -1,71 +0,0 @@ -module ProgramToCompileInfoTest - ( test - ) -where - -import BuildModel ( AvailableModule(..) - , CompileTimeInfo(..) - , Source(..) - , constructCompileTimeInfo - ) -import Hedge ( Result - , Test - , assertEmpty - , assertEquals - , givenInput - , then' - , whenTransformed - ) -import System.FilePath ( () ) - -test :: IO (Test ()) -test = return $ givenInput - "a program and available modules" - (exampleProgram, availableModules) - [ whenTransformed - "its compileTimeInfo is determined" - 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 - , then' "the direct dependencies are only the available modules used" - checkDirectDependencies - ] - ] - -exampleProgram :: Source -exampleProgram = Program - { programSourceFileName = programSourceFileName' - , programObjectFileName = \bd -> bd "some_file_somewhere.f90.o" - , programModulesUsed = ["module1", "module2", "module3"] - } - -programSourceFileName' :: FilePath -programSourceFileName' = "some" "file" "somewhere.f90" - -availableModules :: [AvailableModule] -availableModules = [ AvailableModule {availableModuleName = "module1", availableModuleFile = "build_dir" "module1.mod"} - , AvailableModule {availableModuleName = "module3", availableModuleFile = "build_dir" "module3.mod"} - ] - -doCompileTimeTransformation :: (Source, [AvailableModule]) -> CompileTimeInfo -doCompileTimeTransformation (programSource, otherSources) = - constructCompileTimeInfo programSource otherSources "build_dir" - -checkSourceFileName :: CompileTimeInfo -> Result -checkSourceFileName cti = - assertEquals programSourceFileName' (compileTimeInfoSourceFileName cti) - -checkObjectFileName :: CompileTimeInfo -> Result -checkObjectFileName cti = assertEquals - ("build_dir" "some_file_somewhere.f90.o") - (compileTimeInfoObjectFileProduced cti) - -checkOtherFilesProduced :: CompileTimeInfo -> Result -checkOtherFilesProduced cti = - assertEmpty (compileTimeInfoOtherFilesProduced cti) - -checkDirectDependencies :: CompileTimeInfo -> Result -checkDirectDependencies cti = assertEquals - ["build_dir" "module1.mod", "build_dir" "module3.mod"] - (compileTimeInfoDirectDependencies cti) -- cgit v1.2.3