Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Unit tests?

Rank

Total Posts: 4

Joined 2014-09-07

PM

Hi Folks,

Looking at the \examples directory in the SDK, I see that there are both .csv files and .fit files. Presumably the .csv files are a CSV representation of the contents of the .fit files.

I wrote a unit test harness today to compare the .csv files to the .fit files from that directory, and found a number of differences between the pairs of .csv and .fit files.

I've been changing the .csv files to match the .fit files, as I'm going to take the .fit files as the "source of truth". I've now got all 10 pairs of files passing a crude unit test suite.

My goal is to build a Portable Class Library C# .fit parser implementation that will work across Windows, Windows Phone, iOS, and Android. I already have that working with the reference implementation C# parser. But the performance of that parser leaves a lot to be desired (such is the case with code-gen'd parsers). Before I can write a hand-rolled high performance .fit parser, I need a reliable test suite first. Do folks out there have additional unit tests that they've written that they would like to contribute? That would greatly help my effort.

Thanks,
-John
     
RankRankRank

Total Posts: 91

Joined 2012-10-12

PM

Hi John, yes the .csv files in the examples folder are intended to be human readable versions of the .fit files. I will review and update the discrepancies in a future SDK release.

ShaneP      
Rank

Total Posts: 4

Joined 2014-09-07

PM

Thanks, Shane.

How do you guys test your parser? It would be awesome if you could make your test suites public; that would help lots of folks who are building their own implementations.

Thanks,
-John