Skip to content

Commit

Permalink
fixed bug in integration tests #105
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophBrandl committed Dec 13, 2019
1 parent 9369011 commit 233cca4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion samples/arduino/arduino_integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ def test_arduino_translate_to_native_code(self):
for digit in str(float(results_framework[i][0][0])):
if (digit=='.'):
dot_index=counter
if (digit==str(float(results_arduino[i]))[counter]):
if (counter<len(results_arduino[i]) and digit==str(float(results_arduino[i]))[counter]):
counter=counter+1
else:
break

if (counter>=len(str(float(results_framework[i][0][0])))):
counter=self.precision + dot_index

if ((counter-dot_index +1)<self.precision):
self.assertTrue(False)

Expand Down

0 comments on commit 233cca4

Please sign in to comment.