Skip to content

Commit

Permalink
Remove from coverage report what we cannot inherently test
Browse files Browse the repository at this point in the history
I.e. cprintf and +paletteditor, cause they either

     • depend on the java desktop runtime (cprintf)
     • require interactive interaction from the user (+paletteditor)

This should indeed rise up quite a lot total coverage since all these
functions are definitely fatty.
  • Loading branch information
beddalumia committed Aug 20, 2022
1 parent ada0eae commit 7b63fb1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:
# sudo apt-get install poppler-utils -y
# cd $GITHUB_WORKSPACE
# Run all MATLAB tests
- run: |
echo preprocessing source code...
rm colortools/cprintf.m
rm -r brewer/+paletteditor
rm -r cubehelix/+paletteditor
- name: Run TESTSUITE
uses: matlab-actions/run-tests@v1
with:
Expand Down
28 changes: 14 additions & 14 deletions .test/test_all_docstrings.m
Original file line number Diff line number Diff line change
Expand Up @@ -204,20 +204,20 @@ function all_docstrings()
close all force % brewer is nasty
disp '...done!'

disp CPRINTF
cprintf; % displays the demo
cprintf('text', 'regular black text');
cprintf('hyper', 'followed %s','by');
cprintf('key', '%d colored', 4);
cprintf('-comment','& underlined');
cprintf('err', 'elements\n');
cprintf('cyan', 'cyan');
cprintf('_green', 'underlined green');
cprintf(-[1,0,1], 'underlined magenta');
cprintf([1,0.5,0],'and multi-\nline orange\n');
cprintf('*blue', 'and *bold* (R2011b+ only)\n');
cprintf('string'); % same as fprintf('string') and cprintf('text','string')
disp '...DONE!'
% disp CPRINTF
% cprintf; % displays the demo
% cprintf('text', 'regular black text');
% cprintf('hyper', 'followed %s','by');
% cprintf('key', '%d colored', 4);
% cprintf('-comment','& underlined');
% cprintf('err', 'elements\n');
% cprintf('cyan', 'cyan');
% cprintf('_green', 'underlined green');
% cprintf(-[1,0,1], 'underlined magenta');
% cprintf([1,0.5,0],'and multi-\nline orange\n');
% cprintf('*blue', 'and *bold* (R2011b+ only)\n');
% cprintf('string'); % same as fprintf('string') and cprintf('text','string')
% disp '...DONE!'

end

Expand Down
4 changes: 2 additions & 2 deletions colortools/str2rgb.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
%
% MIT LICENSE (c) 2022, Gabriele Bellomia
%
% See also rgb.X11, rgb.xkcd, rgb.view, strlookup, palette
% See also rgb.X11, rgb.xkcd, view_color, strlookup, palette

%% Input wrangling

Expand Down Expand Up @@ -175,7 +175,7 @@
RGB(i,:) = rgb.X11(requested_names{i}); disp('Catched!')
catch
warn_msg = ['Color not found. ',...
'Call rgb.view to inspect the options.'];
'Call view_color to inspect the options.'];
disp(warn_msg); % finally give up and exit
return
end
Expand Down

0 comments on commit 7b63fb1

Please sign in to comment.