comparison doc/interpreter/testfun.txi @ 10846:a4f482e66b65

Grammarcheck more of the documentation. Use @noindent macro appropriately. Limit line length to 80 characters.
author Rik <octave@nomad.inbox5.com>
date Sun, 01 Aug 2010 20:22:17 -0700
parents 322f43e0e170
children fd0a3ac60b0e
comparison
equal deleted inserted replaced
10845:c0ffe159ba1a 10846:a4f482e66b65
115 115
116 @example 116 @example
117 %!assert (@dots{}) 117 %!assert (@dots{})
118 @end example 118 @end example
119 119
120 @noindent
120 which is equivalent to: 121 which is equivalent to:
121 122
122 @example 123 @example
123 %!test assert (@dots{}) 124 %!test assert (@dots{})
124 @end example 125 @end example
182 183
183 @example 184 @example
184 %!error <passes!> error('this test passes!'); 185 %!error <passes!> error('this test passes!');
185 @end example 186 @end example
186 187
187 If the code doesn't generate an error, the test fails. For example, 188 If the code doesn't generate an error, the test fails. For example:
188 189
189 @example 190 @example
190 %!error "this is an error because it succeeds."; 191 %!error "this is an error because it succeeds.";
191 @end example 192 @end example
192 193
194 @noindent
193 produces 195 produces
194 196
195 @example 197 @example
196 @group 198 @group
197 ***** error "this is an error because it succeeds."; 199 ***** error "this is an error because it succeeds.";
212 %! plot(@var{t},@var{x}); 214 %! plot(@var{t},@var{x});
213 %! you should now see a sine wave in your figure window 215 %! you should now see a sine wave in your figure window
214 @end group 216 @end group
215 @end example 217 @end example
216 218
219 @noindent
217 produces 220 produces
218 221
219 @example 222 @example
220 @group 223 @group
221 > @var{t}=[0:0.01:2*pi]; @var{x}=sin(@var{t}); 224 > @var{t}=[0:0.01:2*pi]; @var{x}=sin(@var{t});
280 %!test disp('this is a test') 283 %!test disp('this is a test')
281 #endif 284 #endif
282 @end group 285 @end group
283 @end example 286 @end example
284 287
288 @noindent
285 or 289 or
286 290
287 @example 291 @example
288 @group 292 @group
289 /* 293 /*
290 %!test disp('this is a test') 294 %!test disp('this is a test')
291 */ 295 */
292 @end group 296 @end group
293 @end example 297 @end example
294 298
299 @noindent
295 but then the code will have to be on the load path and the user 300 but then the code will have to be on the load path and the user
296 will have to remember to type test('name.cc'). Conversely, you 301 will have to remember to type test('name.cc'). Conversely, you
297 can separate the tests from normal Octave script files by putting 302 can separate the tests from normal Octave script files by putting
298 them in plain files with no extension rather than in script files. 303 them in plain files with no extension rather than in script files.
299 @c DO I WANT TO INCLUDE THE EDITOR SPECIFIC STATEMENT BELOW??? 304 @c DO I WANT TO INCLUDE THE EDITOR SPECIFIC STATEMENT BELOW???