Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
gatorsmile committed Jun 18, 2018
1 parent 52e706b commit f9a9f68
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ class XPathExpressionSuite extends SparkFunSuite with ExpressionEvalHelper {

// Test error message for invalid XML document
val e1 = intercept[RuntimeException] { testExpr("<a>/a>", "a", null.asInstanceOf[T]) }
assert(e1.getCause.getMessage.contains("Invalid XML document") &&
e1.getCause.getMessage.contains("<a>/a>"))
assert(e1.getCause.getCause.getMessage.contains(
"XML document structures must start and end within the same entity."))
assert(e1.getMessage.contains("<a>/a>"))

// Test error message for invalid xpath
val e2 = intercept[RuntimeException] { testExpr("<a></a>", "!#$", null.asInstanceOf[T]) }
Expand Down

0 comments on commit f9a9f68

Please sign in to comment.