# HG changeset patch # User Markus Mützel # Date 1665991657 -7200 # Node ID b01e8e322838171bfe9f78c9a2a2173bd405650a # Parent e649aa69d5bc95c006f0d009d1481a4394e63ecd test: Add test for number of methods with classdef in @folder (bug #62802). * test/classdef/classdef.tst: Add test for number of methods returned for classdef that defines methods in an @folder and in the function definition. * test/classdef/@class_bug62802/amethod.m, test/classdef/@class_bug62802/class_bug62802.m: Add new files. * test/classdef/module.mk: Add new files to dist. diff -r e649aa69d5bc -r b01e8e322838 test/classdef/@class_bug62802/amethod.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/classdef/@class_bug62802/amethod.m Mon Oct 17 09:27:37 2022 +0200 @@ -0,0 +1,3 @@ +function amethod (obj) +## This method is stored in a separate file. +endfunction diff -r e649aa69d5bc -r b01e8e322838 test/classdef/@class_bug62802/class_bug62802.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/classdef/@class_bug62802/class_bug62802.m Mon Oct 17 09:27:37 2022 +0200 @@ -0,0 +1,18 @@ +classdef class_bug62802 +## Test class with methods in a @folder and in the classdef definition + + methods + + function obj = class_bug62802 () + endfunction + + function foo (obj) + endfunction + + function disp (obj) + fprintf ("Hello\n"); + endfunction + + endmethods + +endclassdef diff -r e649aa69d5bc -r b01e8e322838 test/classdef/classdef.tst --- a/test/classdef/classdef.tst Sat Oct 15 18:46:04 2022 +0200 +++ b/test/classdef/classdef.tst Mon Oct 17 09:27:37 2022 +0200 @@ -210,3 +210,6 @@ %! x = bug_60763 (); %! assert (x.foobar (), {"some_property"}); %! assert (x.methods (), 42); + +## test class with methods in @folder and in classdef definition +%!assert <*62802> (numel (methods ("class_bug62802")), 4) diff -r e649aa69d5bc -r b01e8e322838 test/classdef/module.mk --- a/test/classdef/module.mk Sat Oct 15 18:46:04 2022 +0200 +++ b/test/classdef/module.mk Mon Oct 17 09:27:37 2022 +0200 @@ -1,4 +1,6 @@ classdef_TEST_FILES = \ + %reldir%/@class_bug62802/amethod.m \ + %reldir%/@class_bug62802/class_bug62802.m \ %reldir%/bug_60763.m \ %reldir%/class_bug52614A.m \ %reldir%/class_bug52614B.m \