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

Indicate the true position of assertTrue arguments #8642

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

joroKr21
Copy link
Contributor

@joroKr21 joroKr21 commented Jan 21, 2024

close #8362
/claim #8362

val code = Expr(Macros.showExpr(expr))
val arrow = transform(expr).asExprOf[TestArrow[Any, Boolean]]
val pos = expr.asTerm.pos
val location = Expr(Some(s"${pos.sourceFile.path}:${pos.endLine + 1}"))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endLine is a bit arbitrary, but it seems to be what SourceLocation does

@adamgfraser adamgfraser merged commit 82fe538 into zio:series/2.x Jan 22, 2024
20 checks passed
@joroKr21 joroKr21 deleted the assert-true-position branch January 22, 2024 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Variadic assertTrue doesn't report which assertion failed
2 participants