aboutsummaryrefslogtreecommitdiffstats
path: root/tests/CommonLibs/TimevalTest.cpp
AgeCommit message (Collapse)AuthorFilesLines
2018-01-15tests: TimevalTest: refactor and avoid double comparisonPau Espin Pedrol1-9/+15
Before this patch, the experession assert(then_secondws==then.seconds()) was failing in x86 architecture (and passing when adding a fprintf to debug it). Avoid comparing the double values with == as that's usually a bad idea, since the processor can output slightly different results for the same operation depending on how it is optimized. Use timespec() instead to check the invariant. Take the chance to refactor some variables around to make the test easier to read. Change-Id: Id4324be8ece86d371b1acb46bbd97856dfed241d
2018-01-10tests: Timeval: adapt to have reproducible output and enable autotestPau Espin Pedrol1-4/+17
Change-Id: I1a79892ba3c934879a171789e0edb357277acae4
2018-01-10Set up GNU Autotest infrastructurePau Espin Pedrol1-0/+45
Test files are moved from CommonLibs/ to tests/CommonLibs/. Some tests are disabled in autotest because they generate timedate related output which cannot exactly match against expected output. Change-Id: I3d6ba625968be09297642d18090c496490e9b8fc