annotate test/classdef/foo_method_changes_property_size.m @ 16049:ebd2259c5df1 classdef

Fix classdef tests. * test/classdef/foo_method_changes_property_size.m: Use correct constructor name. * test/classdef/test_classdef.m: Likewise.
author Michael Goffioul <michael.goffioul@gmail.com>
date Mon, 11 Feb 2013 15:24:56 -0500
parents 24ceda35d146
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15967
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
1 classdef foo_method_changes_property_size
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
2 properties
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
3 element;
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
4 end
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
5 methods
16049
ebd2259c5df1 Fix classdef tests.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 15967
diff changeset
6 function obj = foo_method_changes_property_size (n)
15967
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
7 obj.element = 1:n;
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
8 end
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
9 function obj = move_element_to_end (obj, n)
16049
ebd2259c5df1 Fix classdef tests.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 15967
diff changeset
10 obj.element(end+1) = obj.element(n);
15967
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
11 obj.element(n) = [];
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
12 end
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
13 end
24ceda35d146 Add classdef tests for method changing the size of a property.
Ben Abbott <bpabbott@mac.com>
parents:
diff changeset
14 end