Class: matlab.unittest.diagnostics.Diagnostic
Package: matlab.unittest.diagnostics
Join multiple diagnostics into a single array
diagArray = join(diag1,...,diagN)
joins
multiple diagnostics, specified by diagArray
= join(diag
1,...,diag
N)diag1
through diagN
,
into a single array, diagArray
.
|
Diagnostic content, specified as an instance of a |
|
Array of joined diagnostic content.
|
You can use array concatenation join diagnostics into an array
if at least one of the values is a diagnostic. The join
method
prevents the need to have any Diagnostics
in the
array. Considering the following example.
arbitraryValue = 5; testCase.verifyThat(false, IsTrue, ... ['should have been true', ... @() system('ps'), ... arbitraryValue, ... MyCustomDiagnostic]);
Since MyCustomDiagnostic
is a Diagnostic
,
the other values are correctly converted to diagnostics as well.