Short projects: Difference between revisions

Jump to navigation Jump to search
2,142 bytes added ,  12 September 2023
add section on input testing/validation
(→‎Easy Closes: status updates)
(add section on input testing/validation)
Line 14: Line 14:
== Implement missing Matlab functions ==
== Implement missing Matlab functions ==


Use the [https://savannah.gnu.org/patch/?func=additem&group=octave Savannah patch tracker] for submissions unrelated to an existing bug.
* Use the [https://savannah.gnu.org/patch/?func=additem&group=octave Savannah patch tracker] for submissions unrelated to an existing bug.
 
== Test Octave functions for proper input handling ==
 
* Many functions either do insufficient input checking or the input requirements have changed over time.
* Contributors can try to break Octave function behavior with different types of input, and document the results.
* Users can check <em>expected behavior</em> according to the Octave help and, if applicable, expected compatible behavior according to [https://www.mathworks.com/help/matlab/ public facing Matlab documentation].
* Inputs to test can be:
** different numeric types - double, single, integer.
** non-numeric types - logical, string, cell, struct
** different input shapes - scalar, row/column vectors, 2D, 3D, & nD arrays, zero size arrays ([], 1x0, and 1x3x0 are all empty but may require different handling).
** char/string parameters: different case handling, partial matching behavior, invalid/nonsense parameters.
* For the input items above, does function behave acceptably? Are numerical or graphical outputs as expected? Is output consistent? Is any error message intelligible/meaningful to the user? 
* Optionally the behavior above can be tested against Matlab function output if it is available. If needed but not available, tests can be submitted to other developers for output checking.
** Note 1: There is much undocumented Matlab behavior.  Because this has the possibility of changing with little notice, fixing incompatibilities related to such undocumented behavior is considered on a case-by-case basis by the developer team. Documentation of such cases is always beneficial, however.
** Note 2: Only Matlab public documentation and function output may be compared.  <em>Internal Matlab code, even if available, should never even be looked at by a contributor. Contributions will be discarded if it is determined such action occurred.</em>
* Contributors can submit bug reports to the [https://savannah.gnu.org/bugs/?group=octave Octave Bug Tracker] documenting their findings.
* An example can be see in bug {{bug|64078}} comment #10 of looking through the /plot/draw functions for how they handle integer and logical inputs to numeric fields.
 


== Write Built-In Self Tests (BISTs) ==
== Write Built-In Self Tests (BISTs) ==
154

edits

Navigation menu