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

Test reported file line / character position in unit tests #93

Open
Gama11 opened this issue Mar 2, 2016 · 0 comments
Open

Test reported file line / character position in unit tests #93

Gama11 opened this issue Mar 2, 2016 · 0 comments
Labels

Comments

@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

Currently only the actual message is tested, which means we have no way to verify that the positions are correct. Maybe we could take some inspiration from clang-tidy here, they place comments directly in the code specifying expected message, line and character position, for example:

a = 123 * sizeof(s2);
// CHECK-MESSAGES: :[[@LINE-1]]:13: warning: sizeof() doesn't return the size

https://github.com/llvm-mirror/clang-tools-extra/blob/master/test/clang-tidy/misc-sizeof-container.cpp#L68-L69

@Gama11 Gama11 added bug testing and removed bug labels Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant