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.
1 parent 27b9d49 commit 7f892acCopy full SHA for 7f892ac
test/test_preproc.py
@@ -30,6 +30,9 @@ def check_return(result_array, checks):
30
string += hover_req(file_path, 10, 15) # defined without ()
31
file_path = root_dir / "preproc_keywords.F90"
32
string += hover_req(file_path, 6, 2) # ignores PP across Fortran line continuations
33
+ file_path = root_dir / "preproc_else.F90"
34
+ string += hover_req(file_path, 8, 12)
35
+ string += hover_req(file_path, 18, 12)
36
config = str(root_dir / ".pp_conf.json")
37
errcode, results = run_request(string, ["--config", config])
38
assert errcode == 0
@@ -49,6 +52,8 @@ def check_return(result_array, checks):
49
52
),
50
53
"```fortran90\n#define SUCCESS .true.\n```",
51
54
"```fortran90\nREAL, CONTIGUOUS, POINTER, DIMENSION(:) :: var1\n```",
55
+ "```fortran90\nINTEGER :: var0\n```",
56
+ "```fortran90\nREAL :: var1\n```",
57
)
58
assert len(ref_results) == len(results) - 1
59
check_return(results[1:], ref_results)
test/test_source/pp/preproc_else.F90
@@ -0,0 +1,21 @@
1
+subroutine preprocessor_else(var)
2
+
3
+#if 0
4
+#define MYTYPE logical
5
+#else
6
+#define MYTYPE integer
7
+#endif
8
9
+MYTYPE :: var0
10
11
+#undef MYTYPE
12
13
+#if 1
14
+#define MYTYPE real
15
16
+#define MYTYPE character
17
18
19
+MYTYPE :: var1
20
21
+endsubroutine preprocessor_else
0 commit comments