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

in() should be optional for single-source subject assertion chains #51

Open
kriegfrj opened this issue Jul 29, 2014 · 0 comments
Open
Labels
P3 type=enhancement Make an existing feature better

Comments

@kriegfrj
Copy link

Admittedly I'm pretty new to compile-testing, but I have found in my short time that the bulk of my tests consist of single source files that are designed either to exercise particular error conditions in my annotation processor. Of course given that only one file is being compiled the error will always be in that file. Currently, however, in the javaSource() subject, you still have to specify in() when checking the errors. Instead of:

ASSERT.about(javaSource())
    .that(file)
    .failsToCompile()
    .withErrorContaining("error msg")
    .in(file).onLine(1).atColumn(6);

...I'd like to be able to omit in():

ASSERT.about(javaSource())
    .that(file)
    .failsToCompile()
    .withErrorContaining("error msg")
    .onLine(1).atColumn(6);

I think it would be good to still have in() as an option (because the error might conceivably happen in another file other than your single source - eg, a generated file). However, I have already come across this pattern so many times that I think it would be a useful enhancement.

@raghsriniv raghsriniv added the P3 label Jun 26, 2019
@cgdecker cgdecker added the type=enhancement Make an existing feature better label Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 type=enhancement Make an existing feature better
Projects
None yet
Development

No branches or pull requests

3 participants