summaryrefslogtreecommitdiffstats
path: root/MAINTAINERS
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-05-25 11:41:43 +0930
committerAndrew Jeffery <andrew@aj.id.au>2019-04-08 13:48:50 +0930
commit56692708507e58e889c97123578b376dd84399d9 (patch)
tree41384a03bbaaeda064f3f615e727f44f731a9cf2 /MAINTAINERS
parent280afaf32b33ece0ab22ab25ed76e67a9600f92b (diff)
downloadphosphor-led-sysfs-56692708507e58e889c97123578b376dd84399d9.tar.gz
phosphor-led-sysfs-56692708507e58e889c97123578b376dd84399d9.zip
test: physical: Cover trigger:timer branch in setInitialState()
The test causes execution to take the following path in setInitialState(), previously outlined in 264d909d3dc9 ("test: Add tests for Physical class") as being missed: auto trigger = led.getTrigger(); if (trigger == "timer") { // LED is blinking. Get the delay_on and delay_off and compute // DutyCycle. sfsfs values are in strings. Need to convert 'em over to // integer. auto delayOn = led.getDelayOn(); auto delayOff = led.getDelayOff(); // Calculate frequency and then percentage ON frequency = delayOn + delayOff; auto factor = frequency / 100; auto dutyOn = delayOn / factor; // Update. this->dutyOn(dutyOn); } This brings the line coverage to 96.6% (function coverage remains unchanged by this patch). Change-Id: Ie311186f6275d3fdd31de5698c7c14bb335128e1 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud