MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
IsEqualTo failed.
--> ObjectComparator failed.
--> The objects are not equal using "isequal".

Actual Object:
DNA with properties:

Sequence: 'ACCTGAGTA'
Expected Object:
DNA with properties:

Sequence: 'ACCACAGTA'

Verify that the DNA sequences are equal to each other within a Hamming distance of 1.

testCase.verifyThat(sampleA, IsEqualTo(sampleB,...
'Within', HammingDistance(1)))

Interactive verification failed.

---------------------
Framework Diagnostic:
---------------------
IsEqualTo failed.
--> ObjectComparator failed.
--> The objects are not equal using "isequal".
--> The DNA sequences have a Hamming distance of 2.
The allowable distance is 1.

Actual Object:
DNA with properties:

Sequence: 'ACCTGAGTA'
Expected Object:
DNA with properties:

Sequence: 'ACCACAGTA'

The sequences are not equal to each other within a tolerance of 1. The testing framework
displays additional diagnostics from the getDiagnosticFor method.

Verify that the DNA sequences are equal to each other within a Hamming distance of 2.

testCase.verifyThat(sampleA, IsEqualTo(sampleB,...
'Within', HammingDistance(2)))

33 Unit Testing

Free download pdf