Mercurial > hg > munit
comparison +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 |
comparison
equal
deleted
inserted
replaced
0:33654ef5c7ea | 1:0712aa679900 |
---|---|
1 classdef TestCase < handle | |
2 | |
3 properties | |
4 | |
5 end % properties | |
6 | |
7 methods | |
8 | |
9 function tests = listTests(self) | |
10 tests = {}; | |
11 m = methods(self); | |
12 for kk = 1:numel(m) | |
13 if strncmp(m{kk}, 'test_', 5) | |
14 tests = [ tests m(kk) ]; | |
15 end | |
16 end | |
17 end | |
18 | |
19 function setUpClass(self) | |
20 | |
21 end | |
22 | |
23 function tearDownClass(self) | |
24 | |
25 end | |
26 | |
27 function setUp(self) | |
28 | |
29 end | |
30 | |
31 function tearDown(self) | |
32 | |
33 end | |
34 | |
35 function test_foo(self) | |
36 true; | |
37 end | |
38 | |
39 function test_aaa(self) | |
40 true; | |
41 end | |
42 | |
43 function test_bbb(self) | |
44 true; | |
45 end | |
46 | |
47 function test_bar(self) | |
48 assert(false, 'bar'); | |
49 end | |
50 | |
51 end % methods | |
52 | |
53 end |