Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Assert False does not accept helper message #861

Open
rjkennedy98 opened this issue Nov 13, 2017 · 0 comments
Open

Assert False does not accept helper message #861

rjkennedy98 opened this issue Nov 13, 2017 · 0 comments

Comments

@rjkennedy98
Copy link

Assert False does not accept helper message

Assert False should have a 2 argument function with helper message

Assert False should have a 2 argument function with helper message. This is there for Assert True, but is missing for assert false.

Code below shows the assert-true with $msg as item()* but that is missing for assert-false.

declare function helper:assert-true($supposed-truths as xs:boolean*, $msg as item()*) {
  if (fn:false() = $supposed-truths) then
    fn:error(xs:QName("ASSERT-TRUE-FAILED"), "Assert True failed", $msg)
  else
    helper:success()
};

declare function helper:assert-false($supposed-falsehoods as xs:boolean*) {
  if (fn:true() = $supposed-falsehoods) then
    fn:error(xs:QName("ASSERT-FALSE-FAILED"), "Assert False failed", $supposed-falsehoods)
  else
    helper:success()
};
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants