matlab.automation.diagnostics.StringDiagnostic Class
Namespace: matlab.automation.diagnostics
Superclasses: matlab.automation.diagnostics.Diagnostic
Diagnostic result using string
Renamed from matlab.unittest.diagnostics.StringDiagnostic
in R2023a
Description
The matlab.automation.diagnostics.StringDiagnostic
class defines a
diagnostic result that uses a string. If diagnostic information is known at the time of
construction, use the StringDiagnostic
class to display that diagnostic
information.
When using qualification methods such as verifyThat
, you can specify the test diagnostic directly as a string. In this
case, the testing framework automatically constructs a StringDiagnostic
object.
The matlab.automation.diagnostics.StringDiagnostic
class is a handle
class.
Creation
Description
diag = matlab.automation.diagnostics.StringDiagnostic(diagnosticText)
creates a StringDiagnostic
object and sets its DiagnosticText
property.