FreeEMS Issues - Firmware | |||||
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 |
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 | |||
FirmwareVersion | |||||
Issue Type | Task | ||||
Risk of Breakage | low | ||||
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. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|