addCondition

Class: matlab.unittest.diagnostics.ConstraintDiagnostic
Package: matlab.unittest.diagnostics

Add condition to condition list

Syntax

addCondition(diag, cond)

Description

addCondition(diag, cond) adds the condition, cond, to the condition list. Add conditions to the condition list one at a time. When the condition list is displayed, each condition is preceded by an arrow (-->) delimiter and indented.

Input Arguments

cond

Condition, specified as a character vector or string scalar containing information specific to the cause of the constraint failure or another Diagnostic instance, which acts as a “subdiagnostic”. To set multiple conditions, specify cond as a string array or array of Diagnostic instances.

diag

matlab.unittest.diagnostics.Diagnostic instance.