Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jump to unit test #2026

Closed
dzhwinter opened this issue Jun 16, 2015 · 7 comments
Closed

jump to unit test #2026

dzhwinter opened this issue Jun 16, 2015 · 7 comments

Comments

@dzhwinter
Copy link

I'm not sure it is reasonable to open an issue here. My question is, is there any function or tool can jump to the place in the source code or unittest code where the unit test failed? Just like the compliation buffer does, hightlight the failed unitest and bind a key for jumping to unittest code.

@cpaulik
Copy link
Contributor

cpaulik commented Jun 16, 2015

Are you thinking about a specific language? I would guess that this would be different for different languages.

@dzhwinter
Copy link
Author

Thanks for the rapid reply.
no. just c++ gtest frame work. take a look at this screen shot.
test

@dzhwinter
Copy link
Author

I wanna to jump from failed runtest to runtest case source code or the souce code.

@tuhdo
Copy link
Contributor

tuhdo commented Jun 16, 2015

Seems like pooling_layer.cpp is the test case? If so, you can move point on that and use SPC p g. I assume that your project is recognized by Projectile. Or you can manually use SPC f f and type the name of your test file that contains the test case.

If you use gtags with GNU Global, then you can enable helm-gtags-mode in the compilation buffer and use SPC m g g on a specific symbol to jump there.

@tuhdo
Copy link
Contributor

tuhdo commented Jun 16, 2015

Unfortunately, SPC m g g does not recognize filename:line format, so you may need to select a region with only filename. If you use helm-gtags, you need to enable helm-gtags key bindings in compilation buffer like this:

 (spacemacs/helm-gtags-define-keys-for-mode 'tcl-mode)

in your dotspacemacs/config function in .spacemacs file.

@dzhwinter
Copy link
Author

@StreakyCobra
Copy link
Contributor

@dzhwinter Do you need some more help on this issue? If not, it can probably be close ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants