comparison scripts/java/usejava.m @ 20038:9fc020886ae9

maint: Clean up m-files to follow Octave coding conventions. Try to trim long lines to < 80 chars. Use '##' for single line comments. Use '(...)' around tests for if/elseif/switch/while. Abut cell indexing operator '{' next to variable. Abut array indexing operator '(' next to variable. Use space between negation operator '!' and following expression. Use two newlines between endfunction and start of %!test or %!demo code. Remove unnecessary parens grouping between short-circuit operators. Remove stray extra spaces (typos) between variables and assignment operators. Remove stray extra spaces from ends of lines.
author Rik <rik@octave.org>
date Mon, 23 Feb 2015 14:54:39 -0800
parents 4197fc428c7d
children
comparison
equal deleted inserted replaced
20037:a1acca0c2216 20038:9fc020886ae9
55 print_usage (); 55 print_usage ();
56 endif 56 endif
57 57
58 retval = false; 58 retval = false;
59 59
60 switch feature 60 switch (feature)
61 ## For each feature, try methods() on a Java class of a feature 61 ## For each feature, try methods() on a Java class of a feature
62 case "awt" 62 case "awt"
63 try 63 try
64 dum = methods ("java.awt.Frame"); 64 dum = methods ("java.awt.Frame");
65 retval = true; 65 retval = true;
86 %!assert (usejava ("desktop"), false) 86 %!assert (usejava ("desktop"), false)
87 87
88 %!testif HAVE_JAVA 88 %!testif HAVE_JAVA
89 %! assert (usejava ("jvm"), true); 89 %! assert (usejava ("jvm"), true);
90 90
91 %% Test input validation 91 ## Test input validation
92 %!error usejava () 92 %!error usejava ()
93 %!error usejava (1, 2) 93 %!error usejava (1, 2)
94 %!error usejava (1) 94 %!error usejava (1)
95 %!error <unrecognized feature> usejava ("abc") 95 %!error <unrecognized feature> usejava ("abc")
96 96