Skip to content

Conversation

@RHenigan
Copy link
Contributor

Fixes #1664

This PR is ready for review.

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).
  • I have tested Android, Java SE, and Java EE

Unit Tests

Added unit test for lists with duplicate strings

Core Tests

Test sending a list of voiceCommands where there are duplicate strings
You should now only see one voice command for each unique string you set

Core version / branch / commit hash / module tested against: Manticore
HMI name / version / branch / commit hash / module tested against: Manticore

Summary

This PR adds a helper function to VoiceCommand.java that will remove any duplicate strings when setVoiceCommands gets called. This PR adds the appropriate unit tests

CLA

@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

Merging #1665 (397536b) into develop (e1f9c02) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 397536b differs from pull request most recent head fc8896d. Consider uploading reports for the commit fc8896d to get more accurate results
Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1665      +/-   ##
=============================================
- Coverage      53.99%   53.98%   -0.02%     
- Complexity      5304     5306       +2     
=============================================
  Files            555      555              
  Lines          24532    24533       +1     
  Branches        3094     3094              
=============================================
- Hits           13247    13245       -2     
  Misses         10134    10134              
- Partials        1151     1154       +3     
Impacted Files Coverage Δ Complexity Δ
...tdevicelink/managers/screen/menu/VoiceCommand.java 60.86% <100.00%> (+1.77%) 9.00 <2.00> (+1.00)
...smartdevicelink/encoder/VirtualDisplayEncoder.java 43.70% <0.00%> (-1.40%) 9.00% <0.00%> (ø%)
...ink/managers/screen/BaseTextAndGraphicManager.java 64.16% <0.00%> (+0.41%) 52.00% <0.00%> (+2.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants