From a76428e8c1be1324879699e461ba0720e79bede8 Mon Sep 17 00:00:00 2001
From: Federico Felici <federico.felici@epfl.ch>
Date: Sun, 17 Nov 2019 14:04:03 +0100
Subject: [PATCH] Remove error verbosity & cleanup

---
 tests/test_expcodes.m | 31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/tests/test_expcodes.m b/tests/test_expcodes.m
index 35600a1..b5a1c23 100644
--- a/tests/test_expcodes.m
+++ b/tests/test_expcodes.m
@@ -6,7 +6,7 @@ classdef test_expcodes < matlab.unittest.TestCase
   end
   
   properties(MethodSetupParameter)
-    expcode_number = {1,1005,1006,1010}; % list of expcodes to test
+    expcode_number = {'1','1005','1006','1010'}; % list of expcodes to test
   end
   
   methods(TestClassSetup)
@@ -19,26 +19,35 @@ classdef test_expcodes < matlab.unittest.TestCase
       
       % get SCD experimental code object container
       testCase.SCDexps = SCDconf_createexpcodes;
+      
+      SCDconf_setSIMconf; % set ConfigurationSettings for Simulation
     end
   end
-    
+  
   methods(TestMethodSetup)
     function setup_expcode(testCase,expcode_number)
       % get this expcode object from expcode object container
-      testCase.expcode_obj = getbymaincode(testCase.SCDexps,expcode_number);
-    end 
-  end
-  
-  methods(Test)
-    function test_callinits(testCase)
-      testCase.expcode_obj.callinits;
+      fprintf('\n=== Testing expcode %s ===\n',expcode_number);
+      testCase.expcode_obj = getbymaincode(testCase.SCDexps,str2double(expcode_number));
     end
     
-    function test_setup(testCase)
+    function test_expcode_setup(testCase)
+      fprintf('\n=== Testing callinits for expcode %d: %s === \n',...
+        testCase.expcode_obj.maincode,testCase.expcode_obj.name);
+      testCase.expcode_obj.callinits;
+ 
+      fprintf('\n=== Testing setup for expcode %d: %s === \n',...
+        testCase.expcode_obj.maincode,testCase.expcode_obj.name);
+      
       testCase.expcode_obj.setup; % run setup this exp code
     end
     
-    function test_expcode(testCase)
+  end
+  
+  methods(Test)
+    function tesdt_expcode(testCase)
+      fprintf('\n === Testing Simulink compilation for expcode %d: %s === \n',...
+        testCase.expcode_obj.maincode,testCase.expcode_obj.name);
       % attempt compiling tcv.slx for this expcode
       testCase.expcode_obj.compile; % compile tcv.slx with this expcode
     end
-- 
GitLab