Skip to content

Commit db3c941

Browse files
committed
Simplify use and fix ifx test segfault
1 parent 2b7455c commit db3c941

File tree

1 file changed

+2
-43
lines changed

1 file changed

+2
-43
lines changed

test/fpm_test/test_manifest.f90

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ module test_manifest
66
use fpm_manifest_profile, only: profile_config_t, find_profile
77
use fpm_strings, only: operator(.in.), string_t
88
use fpm_error, only: fatal_error, error_t
9+
use tomlf, only : new_table, toml_table, toml_array
10+
use fpm_toml, only : add_table, add_array, get_value, get_list, set_value, set_list
911
implicit none
1012
private
1113
public :: collect_manifest
@@ -260,7 +262,6 @@ end subroutine test_default_executable
260262
!> Dependencies cannot be created from empty tables
261263
subroutine test_dependency_empty(error)
262264
use fpm_manifest_dependency
263-
use fpm_toml, only : new_table, toml_table
264265

265266
!> Error handling
266267
type(error_t), allocatable, intent(out) :: error
@@ -279,7 +280,6 @@ end subroutine test_dependency_empty
279280
!> Try to create a dependency with conflicting entries
280281
subroutine test_dependency_pathtag(error)
281282
use fpm_manifest_dependency
282-
use fpm_toml, only : new_table, toml_table, set_value
283283

284284
!> Error handling
285285
type(error_t), allocatable, intent(out) :: error
@@ -301,7 +301,6 @@ end subroutine test_dependency_pathtag
301301
!> Try to create a dependency with conflicting entries
302302
subroutine test_dependency_nourl(error)
303303
use fpm_manifest_dependency
304-
use fpm_toml, only : new_table, toml_table, set_value
305304

306305
!> Error handling
307306
type(error_t), allocatable, intent(out) :: error
@@ -322,7 +321,6 @@ end subroutine test_dependency_nourl
322321
!> Try to create a dependency with conflicting entries
323322
subroutine test_dependency_gitpath(error)
324323
use fpm_manifest_dependency
325-
use fpm_toml, only : new_table, toml_table, set_value
326324

327325
!> Error handling
328326
type(error_t), allocatable, intent(out) :: error
@@ -344,7 +342,6 @@ end subroutine test_dependency_gitpath
344342
!> Try to create a dependency with conflicting entries
345343
subroutine test_dependency_gitconflict(error)
346344
use fpm_manifest_dependency
347-
use fpm_toml, only : new_table, toml_table, set_value
348345

349346
!> Error handling
350347
type(error_t), allocatable, intent(out) :: error
@@ -367,7 +364,6 @@ end subroutine test_dependency_gitconflict
367364
!> Try to create a git dependency with an invalid source format.
368365
subroutine test_dependency_invalid_git(error)
369366
use fpm_manifest_dependency
370-
use fpm_toml, only : new_table, toml_table, set_value
371367

372368
!> Error handling
373369
type(error_t), allocatable, intent(out) :: error
@@ -386,7 +382,6 @@ end subroutine test_dependency_invalid_git
386382
!> Namespace is necessary if a dependency is not a git or path dependency
387383
subroutine test_dependency_no_namespace(error)
388384
use fpm_manifest_dependency
389-
use fpm_toml, only : new_table, toml_table, set_value
390385

391386
type(error_t), allocatable, intent(out) :: error
392387

@@ -404,7 +399,6 @@ end subroutine test_dependency_no_namespace
404399
!> Do not specify version with a git or path dependency
405400
subroutine test_dependency_redundant_v(error)
406401
use fpm_manifest_dependency
407-
use fpm_toml, only : new_table, toml_table, set_value
408402

409403
type(error_t), allocatable, intent(out) :: error
410404

@@ -424,7 +418,6 @@ end subroutine test_dependency_redundant_v
424418
!> Try to create a dependency with conflicting entries
425419
subroutine test_dependency_wrongkey(error)
426420
use fpm_manifest_dependency
427-
use fpm_toml, only : new_table, toml_table, set_value
428421

429422
!> Error handling
430423
type(error_t), allocatable, intent(out) :: error
@@ -445,7 +438,6 @@ end subroutine test_dependency_wrongkey
445438
!> Dependency tables can be empty
446439
subroutine test_dependencies_empty(error)
447440
use fpm_manifest_dependency
448-
use fpm_toml, only : new_table, toml_table
449441

450442
!> Error handling
451443
type(error_t), allocatable, intent(out) :: error
@@ -468,7 +460,6 @@ end subroutine test_dependencies_empty
468460
!> Add a dependency as an array, which is not supported
469461
subroutine test_dependencies_typeerror(error)
470462
use fpm_manifest_dependency
471-
use fpm_toml, only : new_table, add_array, toml_table, toml_array
472463

473464
!> Error handling
474465
type(error_t), allocatable, intent(out) :: error
@@ -603,7 +594,6 @@ end subroutine test_profiles_keyvalue_table
603594
!> Executables cannot be created from empty tables
604595
subroutine test_executable_empty(error)
605596
use fpm_manifest_executable
606-
use fpm_toml, only : new_table, toml_table
607597

608598
!> Error handling
609599
type(error_t), allocatable, intent(out) :: error
@@ -621,7 +611,6 @@ end subroutine test_executable_empty
621611
!> Pass a wrong TOML type to the name field of the executable
622612
subroutine test_executable_typeerror(error)
623613
use fpm_manifest_executable
624-
use fpm_toml, only : new_table, add_table, toml_table
625614

626615
!> Error handling
627616
type(error_t), allocatable, intent(out) :: error
@@ -642,7 +631,6 @@ end subroutine test_executable_typeerror
642631
!> Pass a TOML table with insufficient entries to the executable constructor
643632
subroutine test_executable_noname(error)
644633
use fpm_manifest_executable
645-
use fpm_toml, only : new_table, add_table, toml_table
646634

647635
!> Error handling
648636
type(error_t), allocatable, intent(out) :: error
@@ -663,7 +651,6 @@ end subroutine test_executable_noname
663651
!> Pass a TOML table with not allowed keys
664652
subroutine test_executable_wrongkey(error)
665653
use fpm_manifest_executable
666-
use fpm_toml, only : new_table, add_table, toml_table
667654

668655
!> Error handling
669656
type(error_t), allocatable, intent(out) :: error
@@ -838,7 +825,6 @@ end subroutine test_build_invalid_values
838825
!> Libraries can be created from empty tables
839826
subroutine test_library_empty(error)
840827
use fpm_manifest_library
841-
use fpm_toml, only : new_table, toml_table
842828

843829
!> Error handling
844830
type(error_t), allocatable, intent(out) :: error
@@ -871,7 +857,6 @@ end subroutine test_library_empty
871857
!> Pass a TOML table with not allowed keys
872858
subroutine test_library_wrongkey(error)
873859
use fpm_manifest_library
874-
use fpm_toml, only : new_table, add_table, toml_table
875860

876861
!> Error handling
877862
type(error_t), allocatable, intent(out) :: error
@@ -891,7 +876,6 @@ end subroutine test_library_wrongkey
891876
!> Pass a TOML table with not allowed source dirs
892877
subroutine test_library_list(error)
893878
use fpm_manifest_library
894-
use fpm_toml, only : new_table, set_list, toml_table
895879

896880
!> Error handling
897881
type(error_t), allocatable, intent(out) :: error
@@ -910,7 +894,6 @@ end subroutine test_library_list
910894
!> Pass a TOML table with a 1-sized source dir list
911895
subroutine test_library_listone(error)
912896
use fpm_manifest_library
913-
use fpm_toml, only : new_table, set_list, toml_table
914897

915898
!> Error handling
916899
type(error_t), allocatable, intent(out) :: error
@@ -933,8 +916,6 @@ end subroutine test_library_listone
933916
!> Packages cannot be created from empty tables
934917
subroutine test_package_simple(error)
935918
use fpm_manifest_package
936-
use fpm_toml, only : new_table, add_table, add_array, set_value, &
937-
& toml_table, toml_array
938919

939920
!> Error handling
940921
type(error_t), allocatable, intent(out) :: error
@@ -972,7 +953,6 @@ end subroutine test_package_simple
972953
!> Packages cannot be created from empty tables
973954
subroutine test_package_empty(error)
974955
use fpm_manifest_package
975-
use fpm_toml, only : new_table, toml_table
976956

977957
!> Error handling
978958
type(error_t), allocatable, intent(out) :: error
@@ -990,7 +970,6 @@ end subroutine test_package_empty
990970
!> Create an array in the package name, which should cause an error
991971
subroutine test_package_typeerror(error)
992972
use fpm_manifest_package
993-
use fpm_toml, only : new_table, add_array, toml_table, toml_array
994973

995974
!> Error handling
996975
type(error_t), allocatable, intent(out) :: error
@@ -1011,7 +990,6 @@ end subroutine test_package_typeerror
1011990
!> Try to create a new package without a name field
1012991
subroutine test_package_noname(error)
1013992
use fpm_manifest_package
1014-
use fpm_toml, only : new_table, add_table, toml_table
1015993

1016994
!> Error handling
1017995
type(error_t), allocatable, intent(out) :: error
@@ -1034,7 +1012,6 @@ end subroutine test_package_noname
10341012
!> Try to read executables from a mixed type array
10351013
subroutine test_package_wrongexe(error)
10361014
use fpm_manifest_package
1037-
use fpm_toml, only : new_table, set_value, add_array, toml_table, toml_array
10381015

10391016
!> Error handling
10401017
type(error_t), allocatable, intent(out) :: error
@@ -1057,7 +1034,6 @@ end subroutine test_package_wrongexe
10571034
!> Try to read tests from a mixed type array
10581035
subroutine test_package_wrongtest(error)
10591036
use fpm_manifest_package
1060-
use fpm_toml, only : new_table, set_value, add_array, toml_table, toml_array
10611037

10621038
!> Error handling
10631039
type(error_t), allocatable, intent(out) :: error
@@ -1080,7 +1056,6 @@ end subroutine test_package_wrongtest
10801056
!> Try to read tests from a mixed type array
10811057
subroutine test_package_duplicate(error)
10821058
use fpm_manifest_package
1083-
use fpm_toml, only : set_value, add_table, add_array, toml_table, toml_array
10841059

10851060
!> Error handling
10861061
type(error_t), allocatable, intent(out) :: error
@@ -1107,7 +1082,6 @@ end subroutine test_package_duplicate
11071082
!> Tests cannot be created from empty tables
11081083
subroutine test_test_simple(error)
11091084
use fpm_manifest_test
1110-
use fpm_toml, only : new_table, set_value, add_table, toml_table
11111085

11121086
!> Error handling
11131087
type(error_t), allocatable, intent(out) :: error
@@ -1135,7 +1109,6 @@ end subroutine test_test_simple
11351109
!> Tests cannot be created from empty tables
11361110
subroutine test_test_empty(error)
11371111
use fpm_manifest_test
1138-
use fpm_toml, only : new_table, toml_table
11391112

11401113
!> Error handling
11411114
type(error_t), allocatable, intent(out) :: error
@@ -1153,7 +1126,6 @@ end subroutine test_test_empty
11531126
!> Pass a wrong TOML type to the name field of the test
11541127
subroutine test_test_typeerror(error)
11551128
use fpm_manifest_test
1156-
use fpm_toml, only : new_table, add_table, toml_table
11571129

11581130
!> Error handling
11591131
type(error_t), allocatable, intent(out) :: error
@@ -1174,7 +1146,6 @@ end subroutine test_test_typeerror
11741146
!> Pass a TOML table with insufficient entries to the test constructor
11751147
subroutine test_test_noname(error)
11761148
use fpm_manifest_test
1177-
use fpm_toml, only : new_table, add_table, toml_table
11781149

11791150
!> Error handling
11801151
type(error_t), allocatable, intent(out) :: error
@@ -1195,7 +1166,6 @@ end subroutine test_test_noname
11951166
!> Pass a TOML table with not allowed keys
11961167
subroutine test_test_wrongkey(error)
11971168
use fpm_manifest_test
1198-
use fpm_toml, only : new_table, add_table, toml_table
11991169

12001170
!> Error handling
12011171
type(error_t), allocatable, intent(out) :: error
@@ -1216,7 +1186,6 @@ end subroutine test_test_wrongkey
12161186
!> Create a simple example entry
12171187
subroutine test_example_simple(error)
12181188
use fpm_manifest_example
1219-
use fpm_toml, only : new_table, set_value, add_table, toml_table
12201189

12211190
!> Error handling
12221191
type(error_t), allocatable, intent(out) :: error
@@ -1244,7 +1213,6 @@ end subroutine test_example_simple
12441213
!> Examples cannot be created from empty tables
12451214
subroutine test_example_empty(error)
12461215
use fpm_manifest_example
1247-
use fpm_toml, only : new_table, toml_table
12481216

12491217
!> Error handling
12501218
type(error_t), allocatable, intent(out) :: error
@@ -1262,7 +1230,6 @@ end subroutine test_example_empty
12621230
!> Test link options
12631231
subroutine test_link_string(error)
12641232
use fpm_manifest_build
1265-
use fpm_toml, only : set_value, toml_table
12661233

12671234
!> Error handling
12681235
type(error_t), allocatable, intent(out) :: error
@@ -1287,7 +1254,6 @@ end subroutine test_link_string
12871254
!> Test link options
12881255
subroutine test_link_array(error)
12891256
use fpm_manifest_build
1290-
use fpm_toml, only : add_array, set_value, toml_table, toml_array
12911257

12921258
!> Error handling
12931259
type(error_t), allocatable, intent(out) :: error
@@ -1315,7 +1281,6 @@ end subroutine test_link_array
13151281
!> Test link options
13161282
subroutine test_invalid_link(error)
13171283
use fpm_manifest_build
1318-
use fpm_toml, only : add_table, toml_table
13191284

13201285
!> Error handling
13211286
type(error_t), allocatable, intent(out) :: error
@@ -1335,7 +1300,6 @@ end subroutine test_invalid_link
13351300

13361301
subroutine test_install_library(error)
13371302
use fpm_manifest_install
1338-
use fpm_toml, only : toml_table, set_value
13391303

13401304
!> Error handling
13411305
type(error_t), allocatable, intent(out) :: error
@@ -1359,7 +1323,6 @@ end subroutine test_install_library
13591323

13601324
subroutine test_install_empty(error)
13611325
use fpm_manifest_install
1362-
use fpm_toml, only : toml_table
13631326

13641327
!> Error handling
13651328
type(error_t), allocatable, intent(out) :: error
@@ -1382,7 +1345,6 @@ end subroutine test_install_empty
13821345

13831346
subroutine test_install_wrongkey(error)
13841347
use fpm_manifest_install
1385-
use fpm_toml, only : toml_table, set_value
13861348

13871349
!> Error handling
13881350
type(error_t), allocatable, intent(out) :: error
@@ -1399,7 +1361,6 @@ end subroutine test_install_wrongkey
13991361

14001362
subroutine test_preprocess_empty(error)
14011363
use fpm_manifest_preprocess
1402-
use fpm_toml, only : new_table, toml_table
14031364

14041365
!> Error handling
14051366
type(error_t), allocatable, intent(out) :: error
@@ -1417,7 +1378,6 @@ end subroutine test_preprocess_empty
14171378
!> Pass a TOML table with not allowed keys
14181379
subroutine test_preprocess_wrongkey(error)
14191380
use fpm_manifest_preprocess
1420-
use fpm_toml, only : new_table, add_table, toml_table
14211381

14221382
!> Error handling
14231383
type(error_t), allocatable, intent(out) :: error
@@ -1438,7 +1398,6 @@ end subroutine test_preprocess_wrongkey
14381398
!> Preprocess table cannot be empty.
14391399
subroutine test_preprocessors_empty(error)
14401400
use fpm_manifest_preprocess
1441-
use fpm_toml, only : new_table, toml_table
14421401

14431402
!> Error handling
14441403
type(error_t), allocatable, intent(out) :: error

0 commit comments

Comments
 (0)