diff +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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/+unittest/TestCase.m	Tue Dec 27 19:58:37 2011 +0100
@@ -0,0 +1,53 @@
+classdef TestCase < handle
+  
+  properties    
+    
+  end % properties
+    
+  methods
+    
+    function tests = listTests(self)      
+      tests = {};
+      m = methods(self);
+      for kk = 1:numel(m)
+        if strncmp(m{kk}, 'test_', 5)
+          tests = [ tests m(kk) ];
+        end
+      end
+    end
+
+    function setUpClass(self)
+      
+    end
+    
+    function tearDownClass(self)
+      
+    end    
+    
+    function setUp(self)
+      
+    end
+    
+    function tearDown(self)
+
+    end
+    
+    function test_foo(self)
+      true;
+    end
+    
+    function test_aaa(self)
+      true;
+    end
+    
+    function test_bbb(self)
+      true;
+    end
+    
+    function test_bar(self)
+      assert(false, 'bar');
+    end
+    
+  end % methods
+  
+end
\ No newline at end of file