Qurak

ConfirmAssert

లభ్యం

Confirms that a test evaluates to True otherwise throwing to the enclosing Enclose

ConfirmAssert[test]
ConfirmAssert[test, info]
ConfirmAssert[test, info, tag]
Enclose[ConfirmAssert[2 > 1];2] → 2Enclose[ConfirmAssert[2 > 3];2] → Failure[ConfirmationFailed, <|MessageTemplate -> Assertion `` failed., MessageParameters -> {HoldForm[2 > 3]}, ConfirmationType -> ConfirmAssert, Expression -> False, Information -> Null, Test -> False, HeldTest -> Hold[2 > 3]|>]Enclose[Echo[1];ConfirmAssert[1 == 0];Echo[2]] → Failure[ConfirmationFailed, <|MessageTemplate -> Assertion `` failed., MessageParameters -> {HoldForm[1 == 0]}, ConfirmationType -> ConfirmAssert, Expression -> False, Information -> Null, Test -> False, HeldTest -> Hold[1 == 0]|>]

అంశాలు

సంబంధితమైనవి

మొత్తం 6300 ఫంక్షన్లు · దీన్ని MCP క్లయింట్ నుండి వాడండి