Skip to content

Commit d73fc67

Browse files
authored
Merge pull request #98 from gnikit/feature/unittest-upgrade
Restructures signature help tests and adds intrinsic test
2 parents ea283f2 + cd080dd commit d73fc67

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
# CHANGELONG
22

3+
## 2.2.14
4+
5+
### Added
6+
7+
- Added unittests for intrinsics and improved overall coverage
8+
9+
### Changed
10+
11+
- Restructured unittests to individual files for more granular reporting
12+
313
## 2.2.13
414

515
### Added
616

7-
- Automated the update for GitHub Acions
17+
- Automated the update for GitHub Actions
818

919
## 2.2.12
1020

test/test_server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def check_return(result_array):
183183
["test_inherit", 2, 0],
184184
["test_int", 2, 0],
185185
["test_mod", 2, 0],
186+
["test_nan", 2, 0],
186187
["test_nonint_mod", 2, 0],
187188
["test_preproc_keywords", 2, 0],
188189
["test_private", 2, 8],

test/test_server_signature_help.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,21 @@ def test_subroutine_signature_help():
4646
assert len(ref) == len(results) - 1
4747
for i, r in enumerate(ref):
4848
validate_sigh(results[i + 1], r)
49+
50+
51+
def test_intrinsics():
52+
53+
string = write_rpc_request(
54+
1, "initialize", {"rootPath": str(test_dir / "signature")}
55+
)
56+
file_path = test_dir / "signature" / "nested_sigs.f90"
57+
string += sigh_request(file_path, 8, 77)
58+
errcode, results = run_request(
59+
string, ["--hover_signature", "--use_signature_help", "-n", "1"]
60+
)
61+
assert errcode == 0
62+
63+
ref = [[0, 2, "REAL(A, KIND=kind)"]]
64+
assert len(ref) == len(results) - 1
65+
for i, r in enumerate(ref):
66+
validate_sigh(results[i + 1], r)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
program test_nan
2+
use, intrinsic :: iso_fortran_env, only: sp=>real32, dp=>real64, qp=>real128
3+
use, intrinsic :: ieee_arithmetic, only: ieee_value, ieee_quiet_nan, ieee_is_nan
4+
implicit none
5+
6+
complex(qp) :: nan_zp
7+
8+
nan_zp = ieee_value(1.,ieee_quiet_nan)
9+
print '(A4,2X,F5.1,6X,L1,2X,Z32)','zp',real(nan_zp), ieee_is_nan(real(nan_zp)),nan_zp
10+
end program test_nan

0 commit comments

Comments
 (0)