|Anonymous | Login | Signup for a new account||2019-01-18 22:16 UTC|
|Main | My View | View Issues | Roadmap | Repositories|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000156||Firmware||Testing||public||2011-06-15 17:34||2012-10-24 15:58|
|Target Version||Future||Fixed in Version|
|Summary||0000156: Add unit tests for unit testable functions|
// each case:
// checks length, fails if wrong
// parses data into args
// calls function on data/args
// assembles response OR sets error
// lookupPagedMainTableCellValue - pass this RPAGE so that it remains unchanged
// set table values - leave this till last, currently unused by mtx, likely to be removed anyway
// generateDerivedVars - convert to pointers, remove headers, privatise a lot of data!
// calculateFuelAndIgnition - ditto
// scheduling algorithm - ditto
// sleep (milliseconds)
// sleepMicro (microseconds)
// utils that can't be checked: sampleLoopADC sampleBlockADC sampleEachADC - can check for how long each takes! adjustPWM (test only anyway), resetToNonRunningState and setupPagedRAM (would interfere with functioning of device)
// init code may be able to be partially checked
// most other code at this stage is ISR code, flash writing code, or could interfere with the running of the engine
// more testable code will appear with time, such as the HAL layer, and most accessory functions.
Refactor whatever we can to be testable and add tests.
|Tags||No tags attached.|
|Risk of Breakage||low|
|risk = low assumes functions already testable. Those things migrating to a testable form could break in the process.|
|For testing times, I'll use floating point tests, and provide a tolerance. They don't have to be perfect.|
Need to ensure the functionality for each wrapper is in the same page as the target functionality, too.
Function's doxygen should be marked with @Tested or @NOT_TESTED so as to be collated during the doxy build.
|Copyright © 2000 - 2011 MantisBT Group|