annotate +unittest/TestCase.m @ 1:0712aa679900 default tip

Package
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Tue, 27 Dec 2011 19:58:37 +0100
parents TestCase.m@33654ef5c7ea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
1 classdef TestCase < handle
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
2
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
3 properties
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
4
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
5 end % properties
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
6
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
7 methods
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
8
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
9 function tests = listTests(self)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
10 tests = {};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
11 m = methods(self);
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
12 for kk = 1:numel(m)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
13 if strncmp(m{kk}, 'test_', 5)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
14 tests = [ tests m(kk) ];
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
15 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
16 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
17 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
18
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
19 function setUpClass(self)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
20
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
21 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
22
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
23 function tearDownClass(self)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
24
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
25 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
26
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
27 function setUp(self)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
28
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
29 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
30
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
31 function tearDown(self)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
32
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
33 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
34
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
35 function test_foo(self)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
36 true;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
37 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
38
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
39 function test_aaa(self)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
40 true;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
41 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
42
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
43 function test_bbb(self)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
44 true;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
45 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
46
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
47 function test_bar(self)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
48 assert(false, 'bar');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
49 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
50
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
51 end % methods
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
52
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
53 end