We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
intent(in out)
1 parent 9bddd97 commit f9b5840Copy full SHA for f9b5840
test/test_server_hover.py
@@ -442,3 +442,23 @@ def test_var_name_asterisk():
442
# "CHARACTER(KIND=4, LEN=100), DIMENSION(3,4)",
443
]
444
validate_hover(results, ref_results)
445
+
446
447
+def test_intent():
448
+ string = write_rpc_request(1, "initialize", {"rootPath": str(test_dir)})
449
+ file_path = test_dir / "hover" / "intent.f90"
450
+ string += hover_req(file_path, 2, 31)
451
+ string += hover_req(file_path, 3, 29)
452
+ string += hover_req(file_path, 4, 34)
453
+ string += hover_req(file_path, 5, 35)
454
+ string += hover_req(file_path, 6, 35)
455
+ errcode, results = run_request(string, fortls_args=["-n", "1"])
456
+ assert errcode == 0
457
+ ref_results = [
458
+ """INTEGER(4), INTENT(IN)""",
459
+ """INTEGER, INTENT(OUT)""",
460
+ """INTEGER(4), INTENT(INOUT)""",
461
+ """INTEGER(4), INTENT(IN OUT)""",
462
+ """REAL, OPTIONAL, INTENT(IN)""",
463
+ ]
464
+ validate_hover(results, ref_results)
test/test_source/hover/intent.f90
@@ -0,0 +1,8 @@
1
+subroutine intent(arg1, arg2, arg3, arg4, arg5)
2
+ implicit none
3
+ integer(4), intent(in) :: arg1
4
+ integer, intent(out) :: arg2
5
+ integer(4), intent(inout) :: arg3
6
+ integer(4), intent(in out) :: arg4
7
+ real, optional, intent(in) :: arg5
8
+end subroutine intent
0 commit comments