More test passed

This commit is contained in:
ollo 2017-02-28 19:14:09 +01:00
parent 1051abbc45
commit 068f4b62e2
2 changed files with 14 additions and 3 deletions

View File

@ -72,6 +72,7 @@ expected.three=1
expected.tenMin=1 expected.tenMin=1
expected.after=1 expected.after=1
checkWords(leds, expected, 3 , 10) checkWords(leds, expected, 3 , 10)
checkCharacter(display_countwords_de(leds), 12)
leds=display_timestat(4,15) leds=display_timestat(4,15)
expected={} expected={}
@ -79,6 +80,7 @@ expected.four=1
expected.after=1 expected.after=1
expected.quater=1 expected.quater=1
checkWords(leds, expected, 4 , 15) checkWords(leds, expected, 4 , 15)
checkCharacter(display_countwords_de(leds), 15)
leds=display_timestat(5,20) leds=display_timestat(5,20)
expected={} expected={}
@ -86,6 +88,7 @@ expected.five=1
expected.twenty=1 expected.twenty=1
expected.after=1 expected.after=1
checkWords(leds, expected, 5 , 20) checkWords(leds, expected, 5 , 20)
checkCharacter(display_countwords_de(leds), 15)
leds=display_timestat(6,25) leds=display_timestat(6,25)
expected={} expected={}
@ -94,6 +97,7 @@ expected.fiveMin=1
expected.before=1 expected.before=1
expected.half=1 expected.half=1
checkWords(leds, expected, 6 , 25) checkWords(leds, expected, 6 , 25)
checkCharacter(display_countwords_de(leds), 17)
leds=display_timestat(7,30) leds=display_timestat(7,30)
expected={} expected={}
@ -101,6 +105,7 @@ expected.itis=1
expected.eight=1 expected.eight=1
expected.half=1 expected.half=1
checkWords(leds, expected, 7 , 30) checkWords(leds, expected, 7 , 30)
checkCharacter(display_countwords_de(leds), 13)
leds=display_timestat(8,35) leds=display_timestat(8,35)
expected={} expected={}
@ -109,6 +114,7 @@ expected.half=1
expected.fiveMin=1 expected.fiveMin=1
expected.after=1 expected.after=1
checkWords(leds, expected, 8 , 35) checkWords(leds, expected, 8 , 35)
checkCharacter(display_countwords_de(leds), 16)
leds=display_timestat(9,40) leds=display_timestat(9,40)
expected={} expected={}
@ -116,6 +122,7 @@ expected.ten=1
expected.twenty=1 expected.twenty=1
expected.before=1 expected.before=1
checkWords(leds, expected, 9 , 40) checkWords(leds, expected, 9 , 40)
checkCharacter(display_countwords_de(leds), 14)
leds=display_timestat(10,45) leds=display_timestat(10,45)
expected={} expected={}
@ -123,6 +130,7 @@ expected.eleven=1
expected.quater=1 expected.quater=1
expected.before=1 expected.before=1
checkWords(leds, expected, 10 , 45) checkWords(leds, expected, 10 , 45)
checkCharacter(display_countwords_de(leds), 13)
leds=display_timestat(11,50) leds=display_timestat(11,50)
expected={} expected={}
@ -130,6 +138,7 @@ expected.twelve=1
expected.tenMin=1 expected.tenMin=1
expected.before=1 expected.before=1
checkWords(leds, expected, 11 , 50) checkWords(leds, expected, 11 , 50)
checkCharacter(display_countwords_de(leds), 12)
leds=display_timestat(12,55) leds=display_timestat(12,55)
expected={} expected={}
@ -137,6 +146,7 @@ expected.one=1
expected.fiveMin=1 expected.fiveMin=1
expected.before=1 expected.before=1
checkWords(leds, expected, 12 , 55) checkWords(leds, expected, 12 , 55)
checkCharacter(display_countwords_de(leds), 11)
leds=display_timestat(13,00) leds=display_timestat(13,00)
expected={} expected={}
@ -144,6 +154,7 @@ expected.itis=1
expected.one=1 expected.one=1
expected.clock=1 expected.clock=1
checkWords(leds, expected, 13 , 00) checkWords(leds, expected, 13 , 00)
checkCharacter(display_countwords_de(leds), 11)
-- test the minutes inbetween -- test the minutes inbetween
leds=display_timestat(14,01) leds=display_timestat(14,01)

View File

@ -144,12 +144,12 @@ function display_countwords_de(words)
if (words.fiveMin == 1) then if (words.fiveMin == 1) then
amount = amount + 4 amount = amount + 4
end end
if (words.tenMin == 1) then
amount = amount + 4
end
if (words.twenty == 1) then if (words.twenty == 1) then
amount = amount + 7 amount = amount + 7
end end
if (words.ten == 1) then
amount = amount + 4
end
if (words.threequater == 1) then if (words.threequater == 1) then
amount = amount + 11 amount = amount + 11
end end