Closed Hackerpilot closed 3 years ago
Merging #425 into master will increase coverage by
2.01%
. The diff coverage is94.68%
.
@@ Coverage Diff @@
## master #425 +/- ##
==========================================
+ Coverage 79.79% 81.80% +2.01%
==========================================
Files 10 11 +1
Lines 7818 8418 +600
==========================================
+ Hits 6238 6886 +648
+ Misses 1580 1532 -48
Impacted Files | Coverage Δ | |
---|---|---|
test/tester.d | 99.65% <88.88%> (-0.35%) |
:arrow_down: |
src/dparse/astprinter.d | 94.77% <94.77%> (ø) |
|
src/dparse/formatter.d | 41.57% <0.00%> (+3.63%) |
:arrow_up: |
src/dparse/ast.d | 70.73% <0.00%> (+4.87%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 1393ee4...cefbdd0. Read the comment docs.
Irony: Adding the AST checks causes the code coverage to drop, and thus our systems tell us that the library is less well tested.
All right. --DRT-testmode=run-main
was missing from the coverage tests, which has caused the coverage to be wrong for a while. Adding this gets back the behavior that we used to have with older versions of DMD.
As discussed in https://github.com/dlang-community/libdparse/issues/143, this adds an XPath-based testing system for checking that the AST generated by the parser is what we expect. Right now there's just one test, which resembles some code that triggered a soon-to-be-fixed DCD issue.
xmllint
tool must be installed.xmllint
then checks against the AST generated aboveThis is only designed to allow tests for expressions that match, i.e. you cannot use this system to check that an XPath expression does not match the AST, but I don't think that we'll need that.
I think this should be enough to finally close https://github.com/dlang-community/libdparse/issues/143