mozilla / rust-code-analysis

Library to analyze and collect metrics on source code
https://mozilla.github.io/rust-code-analysis/
285 stars 49 forks source link

Add more mozcpp tests #541

Open Luni-4 opened 3 years ago

Luni-4 commented 3 years ago

It would be helpful to add more tests for mozcpp grammar starting from these groups of files (v0.17):

The artifacts are coming from #540

Luni-4 commented 3 years ago

Tests for mozcpp grammar starting from this file (v0.19 #552):

marco-c commented 3 years ago

Tests for mozcpp grammar starting from this file (v0.19):

Some random observations:

path: .spaces[5].metrics.nexits.sum
old: 1.0
new: 2.0

path: .spaces[5].metrics.nexits.average
old: 0.5
new: 1.0

they should both be 2, since there is a single function with two return statements.

Note: I didn't look at the entire file, there might be other things to find.

marco-c commented 3 years ago

lloc seems wrong on cache_gecko-dev_nsprpub_pr_src_cplus_rcnetdb.h.html and on cache_gecko-dev_dom_quota_MemoryOutputStream.cpp.html and on cache_gecko-dev_ipc_chromium_src_base_chrome_application_mac.mm.html.

marco-c commented 3 years ago

Other interesting tests can be found in this file json-diffs-and-minimal-tests.tar.gz generated from #611.

Luni-4 commented 1 year ago

We can use insta tests now

marco-c commented 1 year ago

We can formulate them as insta tests, but we still have to add them.