Skip to content

Commit

Permalink
✅tests(fortran): examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeioth committed May 26, 2024
1 parent d0bc068 commit e8bd2fe
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
program main
use hello_world, only: say_hello
implicit none

call say_hello()
end program main
18 changes: 18 additions & 0 deletions tests/examples/languages/fortran/fpm-build-and-run/fpm.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name = "hello_world"
version = "0.1.0"
license = "license"
author = "potato"
maintainer = "[email protected]"
copyright = "Copyright 2024, potato"
[build]
auto-executables = true
auto-tests = true
auto-examples = true
module-naming = false
[install]
library = false
[fortran]
implicit-typing = false
implicit-external = false
source-form = "free"

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module hello_world
implicit none
private

public :: say_hello
contains
subroutine say_hello
print *, "Hello, hello_world!"
end subroutine say_hello
end module hello_world
6 changes: 6 additions & 0 deletions tests/examples/languages/fortran/fpm-build/app/main.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
program main
use hello_world, only: say_hello
implicit none

call say_hello()
end program main
18 changes: 18 additions & 0 deletions tests/examples/languages/fortran/fpm-build/fpm.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name = "hello_world"
version = "0.1.0"
license = "license"
author = "potato"
maintainer = "[email protected]"
copyright = "Copyright 2024, potato"
[build]
auto-executables = true
auto-tests = true
auto-examples = true
module-naming = false
[install]
library = false
[fortran]
implicit-typing = false
implicit-external = false
source-form = "free"

10 changes: 10 additions & 0 deletions tests/examples/languages/fortran/fpm-build/src/hello_world.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module hello_world
implicit none
private

public :: say_hello
contains
subroutine say_hello
print *, "Hello, hello_world!"
end subroutine say_hello
end module hello_world
6 changes: 6 additions & 0 deletions tests/examples/languages/fortran/fpm-run/app/main.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
program main
use hello_world, only: say_hello
implicit none

call say_hello()
end program main
18 changes: 18 additions & 0 deletions tests/examples/languages/fortran/fpm-run/fpm.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name = "hello_world"
version = "0.1.0"
license = "license"
author = "potato"
maintainer = "[email protected]"
copyright = "Copyright 2024, potato"
[build]
auto-executables = true
auto-tests = true
auto-examples = true
module-naming = false
[install]
library = false
[fortran]
implicit-typing = false
implicit-external = false
source-form = "free"

10 changes: 10 additions & 0 deletions tests/examples/languages/fortran/fpm-run/src/hello_world.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module hello_world
implicit none
private

public :: say_hello
contains
subroutine say_hello
print *, "Hello, hello_world!"
end subroutine say_hello
end module hello_world

0 comments on commit e8bd2fe

Please sign in to comment.