Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ trait AnalysisTest extends PlanTest {
}

if (e.getErrorClass != expectedErrorClass ||
!e.messageParameters.sameElements(expectedMessageParameters) ||
!(e.messageParameters == expectedMessageParameters) ||
Copy link
Member

Choose a reason for hiding this comment

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

Let's simplify this and use != instead of combination of ! and ==.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

(line >= 0 && e.line.getOrElse(-1) != line) ||
(pos >= 0) && e.startPosition.getOrElse(-1) != pos) {
var failMsg = ""
Expand All @@ -194,7 +194,7 @@ trait AnalysisTest extends PlanTest {
|Actual error class: ${e.getErrorClass}
""".stripMargin
}
if (!e.messageParameters.sameElements(expectedMessageParameters)) {
if (!(e.messageParameters == expectedMessageParameters)) {
failMsg +=
s"""Message parameters should be: ${expectedMessageParameters.mkString("\n ")}
|Actual message parameters: ${e.messageParameters.mkString("\n ")}
Expand Down