This repository has been archived by the owner on Oct 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #522 from kleintom/single_result
Single result behavior and clang "Jump to definition"
- Loading branch information
Showing
18 changed files
with
236 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include "foo.h" | ||
|
||
int foo::bar(int a, int b) { return a + b; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class foo { | ||
public: | ||
int bar(int a, int b); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "foo.h" | ||
|
||
void baz(int a) { return; } | ||
|
||
int main(int argc, char* argv[]) { | ||
|
||
foo f; | ||
f.bar(1, 1); | ||
baz(1); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
all: code | ||
|
||
code: main.o foo.o | ||
$(CXX) -o code $^ | ||
|
||
%.o: %.cpp | ||
$(CXX) -c -o $@ $< | ||
|
||
clean: | ||
rm -rf code *.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[DXR] | ||
enabled_plugins = pygmentize clang | ||
es_index = dxr_test_{format}_{tree}_{unique} | ||
es_alias = dxr_test_{format}_{tree} | ||
es_catalog_index = dxr_test_catalog | ||
|
||
[code] | ||
source_folder = code | ||
build_command = make clean; make -j $jobs |
13 changes: 13 additions & 0 deletions
13
dxr/plugins/clang/tests/test_jump_to_def/test_jump_to_def.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""Tests for 'Jump to definition' context menu functionality""" | ||
|
||
from dxr.testing import DxrInstanceTestCase | ||
|
||
|
||
class JumpToDefTests(DxrInstanceTestCase): | ||
|
||
def test_redirect_to_def(self): | ||
"""Test that the redirect URL returned from a "Jump to definition"-type | ||
query finds the definition and doesn't contain any querystring.""" | ||
self.redirect_result_eq('+function:"foo::bar(int, int)"', 'foo.cpp', 3, | ||
'single') | ||
self.redirect_result_eq('+function:baz(int)', 'main.cpp', 3, 'single') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.