Mercurial > hg > octave-lyh
comparison scripts/plot/title.m @ 13136:79b9a7669bb8
Tests added for scripts/plot
(plot/ishghandle.m, plot/text.m, plot/title.m, plot/xlabel.m, plot/ylabel.m,
plot/zlabel.m): Tests added for plot functions.
plot/whitebg.m: Fix typo. Change colors only for figure under test
author | Kai Habel <kai.habel@gmx.de> |
---|---|
date | Wed, 14 Sep 2011 21:03:39 +0200 |
parents | 87015276d625 |
children | e81ddf9cacd5 |
comparison
equal
deleted
inserted
replaced
13135:af36cdb552a6 | 13136:79b9a7669bb8 |
---|---|
50 %! plot3 ([0,1], [0,1], [0,1]); | 50 %! plot3 ([0,1], [0,1], [0,1]); |
51 %! xl = get(gca (), "title"); | 51 %! xl = get(gca (), "title"); |
52 %! title("Testing title") | 52 %! title("Testing title") |
53 %! assert(get(xl,"string"),"Testing title") | 53 %! assert(get(xl,"string"),"Testing title") |
54 | 54 |
55 ## Remove from test statistics. No real tests possible. | 55 %!test |
56 %!assert (1) | 56 %! hf = figure ("visible", "off"); |
57 %! unwind_protect | |
58 %! ax=axes(); | |
59 %! xl = get(ax,"title"); | |
60 %! title("Testing title") | |
61 %! assert(get(xl,"string"),"Testing title") | |
62 %! unwind_protect_cleanup | |
63 %! close (hf); | |
64 %! end_unwind_protect | |
65 | |
66 %!test | |
67 %! hf = figure ("visible", "off"); | |
68 %! unwind_protect | |
69 %! plot3 ([0,1], [0,1], [0,1]); | |
70 %! xl = get(gca (), "title"); | |
71 %! title("Testing title") | |
72 %! assert(get(xl,"string"),"Testing title") | |
73 %! unwind_protect_cleanup | |
74 %! close (hf); | |
75 %! end_unwind_protect |