Mercurial > octave-nkf
comparison test/ctor-vs-method/ctor-vs-method.tst @ 16030:1af8d21608b7
rename all test files in the test directory from test_X.m to X.tst
* Use - instead of _ for .tst file names. Fix all file lists in
module.mk and Makefile.am files.
* __run_test_suite__.m: Adapt to new naming convention.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 09 Feb 2013 21:35:55 -0500 |
parents | test/ctor-vs-method/test_ctor_vs_method.m@72c96de7a403 |
children | d63878346099 |
comparison
equal
deleted
inserted
replaced
16029:b8157404614f | 16030:1af8d21608b7 |
---|---|
1 ## Copyright (C) 2012 John W. Eaton | |
2 ## | |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
19 %% Test script for legacy OOP. | |
20 %% Requires the path to contain the directory ctor-vs-method. | |
21 %% | |
22 %% Note: This script and all classes are also intended to run | |
23 %% in Matlab to test compatibility. Don't break that! | |
24 | |
25 %!shared d, o | |
26 %! d = derived (); | |
27 %! o = other (); | |
28 %! | |
29 %!error method (o); | |
30 | |
31 %!test | |
32 %! ctrace = {'begin parent/method'; | |
33 %! 'begin derived/parent'; | |
34 %! 'begin parent/parent'; | |
35 %! 'end parent/parent'; | |
36 %! 'end derived/parent'; | |
37 %! 'end parent/method'}; | |
38 %! __trace__ (); %% clear call trace info | |
39 %! method (d); | |
40 %! assert (__trace__ (), ctrace); | |
41 | |
42 %!test | |
43 %! ctrace = {'begin other/parent'; | |
44 %! 'end other/parent'}; | |
45 %! __trace__ (); %% clear call trace info | |
46 %! parent (o); | |
47 %! assert (__trace__ (), ctrace); | |
48 | |
49 %!test | |
50 %! ctrace = {'begin derived/parent'; | |
51 %! 'begin parent/parent'; | |
52 %! 'end parent/parent'; | |
53 %! 'end derived/parent'}; | |
54 %! __trace__ (); %% clear call trace info | |
55 %! parent (d); | |
56 %! assert (__trace__ (), ctrace); |