steakhal wrote:

> > I'm a bit unsatisfied with the way of testing this.
> > IMO the `getIssueString` should be tested in a unittest, because it's nice 
> > and pure.
> > How about creating a new unittest as 
> > `clang/unittests/Analysis/IssueHashTest.cpp` where we would assert that for 
> > a given Decl in a C++ snippet it produces the expected issue hash string.
> 
> I personally don't see the value in this more complicated testing. The actual 
> value of a hash is irrelevant (and should not be pinned), the only important 
> property is that we assign different hashes to different bugs -- and that is 
> clearly tested in the existing tests.

This is not true. `getIssueString` is the string that gets hashed. It's 
human-readable. It is way more direct than counting the number of files. And I 
believe that having the setup code (LIT RUN lines) duplicated for 4 tests is 
more than setting up a unittest.

https://github.com/llvm/llvm-project/pull/214102
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to