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

code coverage on partial expressions #19161

Closed
sbromberger opened this issue Oct 30, 2016 · 9 comments
Closed

code coverage on partial expressions #19161

sbromberger opened this issue Oct 30, 2016 · 9 comments
Labels
parser Language parsing and surface syntax

Comments

@sbromberger
Copy link
Contributor

In https://github.com/JuliaGraphs/LightGraphs.jl/blob/master/test/graphdigraph.jl#L65-L68:

g = Graph(sparse(adjmx1))
h = DiGraph(sparse(adjmx1))
@test !is_directed(g)
@test is_directed(h)

However, from julia --inline=no --code-coverage=all test/runtests.jl:

       17 ==(g::DiGraph, h::DiGraph) =
        -     vertices(g) == vertices(h) &&
        -     ne(g) == ne(h) &&
        -     fadj(g) == fadj(h) &&
        -     badj(g) == badj(h)
        -
        - is_directed(g::DiGraph) = true
        -

Codecov reports it similarly: https://codecov.io/gh/JuliaGraphs/LightGraphs.jl/src/c3fad06d21bb85c5b4685ccd1b23b2e5febd07c9/src/digraph.jl

There are a few other places where explicit tests are not being counted. How do I fix this so I can get LG to 100%?

@yuyichao yuyichao added the parser Language parsing and surface syntax label Oct 30, 2016
@yuyichao
Copy link
Contributor

The second case should be fixed on master already. The first case requires parser change and/or partial line/expression coverage support.

@sbromberger
Copy link
Contributor Author

Sorry - what's the first case / second case?

@yuyichao
Copy link
Contributor

First

       17 ==(g::DiGraph, h::DiGraph) =
        -     vertices(g) == vertices(h) &&
        -     ne(g) == ne(h) &&
        -     fadj(g) == fadj(h) &&
        -     badj(g) == badj(h)

Second,

        - is_directed(g::DiGraph) = true

@sbromberger
Copy link
Contributor Author

sbromberger commented Oct 30, 2016

Oh, the == looks fine (and isn't reported as a coverage failure). It's the is_directed that I'm concerned about.

Will the fix be backported to 0.5 at some point?

@yuyichao yuyichao changed the title code coverage not reporting correctly? code coverage on partial expressions Oct 30, 2016
@yuyichao
Copy link
Contributor

AFAICT the second issue is fixed on master and should work even with inining on. I renamed the issue to cover the first case since I don't think we have an issue for it yet.

Please open a new issue about the second case if it is not fixed on master.

@sbromberger
Copy link
Contributor Author

LightGraphs likely won't work on master so I can't really test it.

@yuyichao
Copy link
Contributor

Will the fix be backported to 0.5 at some point?

Very unlikely. There are multiple PR's involved (#18520 #18431 #18196) and it depends on a codegen change (#18163) and closely related to a type inference change (#18260).

@sbromberger
Copy link
Contributor Author

OK, thanks for the input. The first case doesn't really affect me so feel free to use this as the issue, but I'll mute the notifications.

@sbromberger
Copy link
Contributor Author

I'm going to close this out as I'm not sure it's relevant anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Language parsing and surface syntax
Projects
None yet
Development

No branches or pull requests

2 participants