User`s guide
R2014b
2-8
MATLAB errors attempting to define listener for nonobservable property
In previous releases, you could define a listener for a nonobservable property. MATLAB
silently ignored the listener and did not call the listener callback. With release MATLAB
2014b, attempting to create a listener using event.proplistener or addlistener for
a nonobservable property causes an error.
Compatibility Considerations
If your code used meta-data or the properties function to get a list of all properties
defined by a class, and then assigns listeners to all properties, you should change your
code. Rewrite the code to determine if a given property is observable before assigning
the listener. For example, this code determines which properties of MyClass are
SetObservable or GetObservable.
mc = ?MyClass;
p = findobj(mc.PropertyList,'SetObservable',1,'-or','GetObservable',1)
p contains the meta.property objects for the properties of MyClass that are
SetObservable or GetObservable.
Script-based tests in unit testing framework
The MATLAB unit testing framework now provides script-based writing, execution, and
verification of tests as an alternative to writing function-based or class-based tests. For
more information, see Write Script-Based Unit Tests.
Plugin to report code coverage in unit testing framework
The matlab.unittest testing framework provides a plugin that produces a
code coverage report for MATLAB source code. For more information, see the
matlab.unittest.plugins.CodeCoveragePlugin documentation.
Control logging and verbosity in unit testing framework
Test authors can control the verbosity of logged messages in their tests. To
register messages at different verbosity levels, call the log method with a
TestCase or Fixture. To control the verbosity of the output, use a plugin such as