From e8bd2fee8848cbd4c114f5d2260c850df98dafc3 Mon Sep 17 00:00:00 2001 From: Zeioth Date: Sun, 26 May 2024 23:34:38 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85tests(fortran):=20examples.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fortran/fpm-build-and-run/app/main.f90 | 6 ++++++ .../fortran/fpm-build-and-run/fpm.toml | 18 ++++++++++++++++++ .../fpm-build-and-run/src/hello_world.f90 | 10 ++++++++++ .../languages/fortran/fpm-build/app/main.f90 | 6 ++++++ .../languages/fortran/fpm-build/fpm.toml | 18 ++++++++++++++++++ .../fortran/fpm-build/src/hello_world.f90 | 10 ++++++++++ .../languages/fortran/fpm-run/app/main.f90 | 6 ++++++ .../languages/fortran/fpm-run/fpm.toml | 18 ++++++++++++++++++ .../fortran/fpm-run/src/hello_world.f90 | 10 ++++++++++ 9 files changed, 102 insertions(+) create mode 100644 tests/examples/languages/fortran/fpm-build-and-run/app/main.f90 create mode 100644 tests/examples/languages/fortran/fpm-build-and-run/fpm.toml create mode 100644 tests/examples/languages/fortran/fpm-build-and-run/src/hello_world.f90 create mode 100644 tests/examples/languages/fortran/fpm-build/app/main.f90 create mode 100644 tests/examples/languages/fortran/fpm-build/fpm.toml create mode 100644 tests/examples/languages/fortran/fpm-build/src/hello_world.f90 create mode 100644 tests/examples/languages/fortran/fpm-run/app/main.f90 create mode 100644 tests/examples/languages/fortran/fpm-run/fpm.toml create mode 100644 tests/examples/languages/fortran/fpm-run/src/hello_world.f90 diff --git a/tests/examples/languages/fortran/fpm-build-and-run/app/main.f90 b/tests/examples/languages/fortran/fpm-build-and-run/app/main.f90 new file mode 100644 index 0000000..4d5e378 --- /dev/null +++ b/tests/examples/languages/fortran/fpm-build-and-run/app/main.f90 @@ -0,0 +1,6 @@ +program main + use hello_world, only: say_hello + implicit none + + call say_hello() +end program main diff --git a/tests/examples/languages/fortran/fpm-build-and-run/fpm.toml b/tests/examples/languages/fortran/fpm-build-and-run/fpm.toml new file mode 100644 index 0000000..ce63ce0 --- /dev/null +++ b/tests/examples/languages/fortran/fpm-build-and-run/fpm.toml @@ -0,0 +1,18 @@ +name = "hello_world" +version = "0.1.0" +license = "license" +author = "potato" +maintainer = "potatogirl@hotmail.com" +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" + diff --git a/tests/examples/languages/fortran/fpm-build-and-run/src/hello_world.f90 b/tests/examples/languages/fortran/fpm-build-and-run/src/hello_world.f90 new file mode 100644 index 0000000..3e5f6ad --- /dev/null +++ b/tests/examples/languages/fortran/fpm-build-and-run/src/hello_world.f90 @@ -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 diff --git a/tests/examples/languages/fortran/fpm-build/app/main.f90 b/tests/examples/languages/fortran/fpm-build/app/main.f90 new file mode 100644 index 0000000..4d5e378 --- /dev/null +++ b/tests/examples/languages/fortran/fpm-build/app/main.f90 @@ -0,0 +1,6 @@ +program main + use hello_world, only: say_hello + implicit none + + call say_hello() +end program main diff --git a/tests/examples/languages/fortran/fpm-build/fpm.toml b/tests/examples/languages/fortran/fpm-build/fpm.toml new file mode 100644 index 0000000..ce63ce0 --- /dev/null +++ b/tests/examples/languages/fortran/fpm-build/fpm.toml @@ -0,0 +1,18 @@ +name = "hello_world" +version = "0.1.0" +license = "license" +author = "potato" +maintainer = "potatogirl@hotmail.com" +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" + diff --git a/tests/examples/languages/fortran/fpm-build/src/hello_world.f90 b/tests/examples/languages/fortran/fpm-build/src/hello_world.f90 new file mode 100644 index 0000000..3e5f6ad --- /dev/null +++ b/tests/examples/languages/fortran/fpm-build/src/hello_world.f90 @@ -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 diff --git a/tests/examples/languages/fortran/fpm-run/app/main.f90 b/tests/examples/languages/fortran/fpm-run/app/main.f90 new file mode 100644 index 0000000..4d5e378 --- /dev/null +++ b/tests/examples/languages/fortran/fpm-run/app/main.f90 @@ -0,0 +1,6 @@ +program main + use hello_world, only: say_hello + implicit none + + call say_hello() +end program main diff --git a/tests/examples/languages/fortran/fpm-run/fpm.toml b/tests/examples/languages/fortran/fpm-run/fpm.toml new file mode 100644 index 0000000..ce63ce0 --- /dev/null +++ b/tests/examples/languages/fortran/fpm-run/fpm.toml @@ -0,0 +1,18 @@ +name = "hello_world" +version = "0.1.0" +license = "license" +author = "potato" +maintainer = "potatogirl@hotmail.com" +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" + diff --git a/tests/examples/languages/fortran/fpm-run/src/hello_world.f90 b/tests/examples/languages/fortran/fpm-run/src/hello_world.f90 new file mode 100644 index 0000000..3e5f6ad --- /dev/null +++ b/tests/examples/languages/fortran/fpm-run/src/hello_world.f90 @@ -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