@@ -35,3 +35,43 @@ def test_implementation_type_bound():
35
35
errcode , results = run_request (string , ["-n" , "1" ])
36
36
assert errcode == 0
37
37
assert results [1 ] == create (test_dir / "subdir" / "test_free.f90" , 49 , 11 , 28 )
38
+
39
+
40
+ def test_implementation_intrinsics ():
41
+ """Go to implementation of implicit methods is handled gracefully"""
42
+ string = write_rpc_request (1 , "initialize" , {"rootPath" : str (test_dir / "rename" )})
43
+ file_path = test_dir / "rename" / "test_rename_intrinsic.f90"
44
+ string += imp_request (file_path , 11 , 18 )
45
+ errcode , results = run_request (string , ["-n" , "1" ])
46
+ assert errcode == 0
47
+ assert results [1 ] is None
48
+
49
+
50
+ def test_implementation_integer ():
51
+ """Go to implementation when no implementation is present is handled gracefully"""
52
+ string = write_rpc_request (1 , "initialize" , {"rootPath" : str (test_dir / "rename" )})
53
+ file_path = test_dir / "rename" / "test_rename_intrinsic.f90"
54
+ string += imp_request (file_path , 20 , 31 )
55
+ errcode , results = run_request (string , ["-n" , "1" ])
56
+ assert errcode == 0
57
+ assert results [1 ] is None
58
+
59
+
60
+ def test_implementation_empty ():
61
+ """Go to implementation for empty lines is handled gracefully"""
62
+ string = write_rpc_request (1 , "initialize" , {"rootPath" : str (test_dir / "rename" )})
63
+ file_path = test_dir / "rename" / "test_rename_intrinsic.f90"
64
+ string += imp_request (file_path , 13 , 0 )
65
+ errcode , results = run_request (string , ["-n" , "1" ])
66
+ assert errcode == 0
67
+ assert results [1 ] is None
68
+
69
+
70
+ def test_implementation_no_file ():
71
+ """Go to implementation for empty lines is handled gracefully"""
72
+ string = write_rpc_request (1 , "initialize" , {"rootPath" : str (test_dir / "rename" )})
73
+ file_path = test_dir / "rename" / "fake.f90"
74
+ string += imp_request (file_path , 13 , 0 )
75
+ errcode , results = run_request (string , ["-n" , "1" ])
76
+ assert errcode == 0
77
+ assert results [1 ] is None
0 commit comments