Skip to content

Commit

Permalink
No: apparently you still have to call yourself the test functions
Browse files Browse the repository at this point in the history
> we add a caller line to all scripts (and rename functions because
  local functions cannot have the same name as the m-file...)
  • Loading branch information
beddalumia committed Aug 19, 2022
1 parent c80bb75 commit 2a6d6fc
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .art/fireworks_test.m → .art/fireworks.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function fireworks_test()
function fireworks()

disp('TESTING fireworks script [get_palette]')

Expand Down
2 changes: 1 addition & 1 deletion .art/leaves_test.m → .art/leaves.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function leaves_test()
function leaves()

disp('TESTING leaves script [set_palette]')

Expand Down
2 changes: 1 addition & 1 deletion .art/lego_test.m → .art/lego.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function lego_test()
function lego()

disp('TESTING lego script [+palette]')

Expand Down
2 changes: 1 addition & 1 deletion .art/rosa_test.m → .art/rosa.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function rosa_test()
function rosa()

disp('TESTING rosa script [set_palette]')

Expand Down
4 changes: 4 additions & 0 deletions .art/test_genart.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
rosa()
leaves()
lego()
fireworks()
4 changes: 3 additions & 1 deletion .test/test_X11.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function test_X11()
X11_colors()

function X11_colors()

disp('TESTING X11 colorset [rgb.X11;rgb2hex;]')

Expand Down
4 changes: 3 additions & 1 deletion .test/test_all_docstrings.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function test_all_docstrings()
all_docstrings()

function all_docstrings()

disp('TESTING all examples in docstrings.')

Expand Down
4 changes: 3 additions & 1 deletion .test/test_color_conversions.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function test_color_conversions()
color_conversions()

function color_conversions()

disp('TESTING all color conversions [str2rgb;rgb2hex;hex2rgb]')

Expand Down
4 changes: 3 additions & 1 deletion .test/test_color_order.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function test_color_order()
color_order()

function color_order()

disp('TESTING set_colororder')

Expand Down
4 changes: 3 additions & 1 deletion .test/test_colorname_overlap.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function test_colorname_overlap()
colorname_overlap()

function colorname_overlap()

disp('TESTING <X11|xkcd> overlap [+rgb]')

Expand Down
4 changes: 3 additions & 1 deletion .test/test_default_palettes.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function test_default_palettes()
default_palettes()

function default_palettes()

disp('TESTING all default palettes [set_palette]')

Expand Down
12 changes: 11 additions & 1 deletion .test/test_worldmaps.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function test_worldmaps()
worldmaps()

function worldmaps()

disp('TESTING interaction with Mapping Toolbox [preset_palette]')

Expand All @@ -12,18 +14,26 @@ function test_worldmaps()
preset_palette(@palette.viridis);
% apply the preselected colormap
colorizer('viridis')
% build the worldmap
topographer()
% preselect the colorscheme.
preset_palette(@palette.cubehelix,3,-0.5,1.5,1 );
% apply the preselected colormap
colorizer('cubehelix')
% build the worldmap
topographer()
% preselect the colorscheme.
preset_palette(@palette.brewer,'-PuOr');
% apply the preselected colormap
colorizer('-PuOr')
% build the worldmap
topographer()
% preselect the colorscheme.
preset_palette(@palette.cmocean,'topo');
% apply the preselected colormap
colorizer('topo')
% build the worldmap
topographer()
% preselect the colorscheme.
preset_palette(@palette.crameri,'oleron');
% apply the preselected colormap
Expand Down
4 changes: 3 additions & 1 deletion .test/test_xkcd.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function test_xkcd()
xkcd_colors()

function xkcd_colors()

disp('TESTING xkcd colorset [rgb.xkcd;rgb2hex]')

Expand Down

0 comments on commit 2a6d6fc

Please sign in to comment.