Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix initializing soft button object error states #2068

Merged

Conversation

joeljfischer
Copy link
Contributor

@joeljfischer joeljfischer commented Jan 6, 2022

Fixes #2067

Risk

This PR makes no API changes.

Testing Plan

  • I have verified that I have not introduced new warnings in this PR (or explain why below)
  • I have run the unit tests with this PR
  • I have tested this PR against Core and verified behavior (if applicable, if not applicable, explain why below).

Unit Tests

  • Removed unnecessary stubs from soft button object tests

Core Tests

  • Tested setting multiple soft buttons, some with one state and some with multiple states

Core version / branch / commit hash / module tested against: Manticore (Core v8.0.0)
HMI name / version / branch / commit hash / module tested against: Manticore (Generic_HMI v0.11.0)

Summary

This PR updates creating SoftButtonObjects to properly crash in DEBUG when states are invalid and return nil in RELEASE.

Changelog

Bug Fixes
  • Creating SoftButtonObjects properly crash in DEBUG when states are invalid and return nil in RELEASE.

Tasks Remaining:

n/a

CLA

* Fix tests
* Update soft button state initialization to fail in RELEASE in undefined states too
@joeljfischer joeljfischer added bug A defect in the library manager-screen Relating to the manager layer - screen managers labels Jan 6, 2022
@joeljfischer joeljfischer self-assigned this Jan 6, 2022
@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #2068 (bd8041d) into develop (0b534d8) will increase coverage by 0.00%.
The diff coverage is 61.11%.

❗ Current head bd8041d differs from pull request most recent head d14d3dd. Consider uploading reports for the commit d14d3dd to get more accurate results

@@           Coverage Diff            @@
##           develop    #2068   +/-   ##
========================================
  Coverage    85.83%   85.83%           
========================================
  Files          447      447           
  Lines        23377    23392   +15     
========================================
+ Hits         20066    20079   +13     
- Misses        3311     3313    +2     

@joeljfischer joeljfischer merged commit 937d3f4 into develop Feb 2, 2022
@joeljfischer joeljfischer deleted the bugfix/issue-2067-softbuttonobject-invalid-config branch February 2, 2022 19:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug A defect in the library manager-screen Relating to the manager layer - screen managers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants