Skip to content

Commit

Permalink
Improves coverage of GoTo implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
gnikit committed Mar 25, 2022
1 parent c0ef77b commit 3fed18c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/test_server_implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,33 @@ def test_implementation_intrinsics():
errcode, results = run_request(string, ["-n", "1"])
assert errcode == 0
assert results[1] is None


def test_implementation_integer():
"""Go to implementation when no implementation is present is handled gracefully"""
string = write_rpc_request(1, "initialize", {"rootPath": str(test_dir / "rename")})
file_path = test_dir / "rename" / "test_rename_intrinsic.f90"
string += imp_request(file_path, 20, 31)
errcode, results = run_request(string, ["-n", "1"])
assert errcode == 0
assert results[1] is None


def test_implementation_empty():
"""Go to implementation for empty lines is handled gracefully"""
string = write_rpc_request(1, "initialize", {"rootPath": str(test_dir / "rename")})
file_path = test_dir / "rename" / "test_rename_intrinsic.f90"
string += imp_request(file_path, 13, 0)
errcode, results = run_request(string, ["-n", "1"])
assert errcode == 0
assert results[1] is None


def test_implementation_no_file():
"""Go to implementation for empty lines is handled gracefully"""
string = write_rpc_request(1, "initialize", {"rootPath": str(test_dir / "rename")})
file_path = test_dir / "rename" / "fake.f90"
string += imp_request(file_path, 13, 0)
errcode, results = run_request(string, ["-n", "1"])
assert errcode == 0
assert results[1] is None

0 comments on commit 3fed18c

Please sign in to comment.