Anonymous | Login | Signup for a new account | 2021-01-21 20:54 UTC | ![]() |
Main | My View | View Issues | Roadmap | Repositories |
View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
0000156 | Firmware | Testing | public | 2011-06-15 17:34 | 2012-10-24 15:58 | ||||||
Reporter | Fred | ||||||||||
Assigned To | Fred | ||||||||||
Priority | normal | Severity | minor | Reproducibility | N/A | ||||||
Status | assigned | Resolution | open | ||||||||
Platform | OS | OS Version | |||||||||
Product Version | |||||||||||
Target Version | Future | Fixed in Version | |||||||||
Summary | 0000156: Add unit tests for unit testable functions | ||||||||||
Description | Copy/paste: // each case: // checks length, fails if wrong // parses data into args // calls function on data/args // assembles response OR sets error // breaks // testable: // lookupPagedMainTableCellValue - pass this RPAGE so that it remains unchanged // validateMainTable // validateTwoDTable // 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 // safeAdd // safeTrim // safeScale // sleep (milliseconds) // sleepMicro (microseconds) // checksum // stringCopy // compare // 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. | ||||||||||
FirmwareVersion | |||||||||||
Issue Type | Task | ||||||||||
Risk of Breakage | low | ||||||||||
Attached Files | |||||||||||
![]() |
|
![]() Fred (administrator) 2011-06-28 19:06 |
risk = low assumes functions already testable. Those things migrating to a testable form could break in the process. |
![]() Fred (administrator) 2012-10-24 15:48 |
For testing times, I'll use floating point tests, and provide a tolerance. They don't have to be perfect. |
![]() Fred (administrator) 2012-10-24 15:58 |
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 |