hawktracer
hawktracer copied to clipboard
Unit tests for chrome trace converter
Issue #15
Added unit tests for the chrome trace converter module.
[----------] 9 tests from TestChromeTraceConverter
[ RUN ] TestChromeTraceConverter.CheckFileAfterOpenButNoEvents
[ OK ] TestChromeTraceConverter.CheckFileAfterOpenButNoEvents (0 ms)
[ RUN ] TestChromeTraceConverter.CheckWhenEmptyEventProcessed
[ OK ] TestChromeTraceConverter.CheckWhenEmptyEventProcessed (1 ms)
[ RUN ] TestChromeTraceConverter.CheckWhenOnlyTimeStampAdded
[ OK ] TestChromeTraceConverter.CheckWhenOnlyTimeStampAdded (0 ms)
[ RUN ] TestChromeTraceConverter.CheckWhenNameTimeStampAdded
[ OK ] TestChromeTraceConverter.CheckWhenNameTimeStampAdded (0 ms)
[ RUN ] TestChromeTraceConverter.CheckWhenLabelTimeStampAdded
[ OK ] TestChromeTraceConverter.CheckWhenLabelTimeStampAdded (1 ms)
[ RUN ] TestChromeTraceConverter.CheckWhenNameAndDurationAdded
[ OK ] TestChromeTraceConverter.CheckWhenNameAndDurationAdded (0 ms)
[ RUN ] TestChromeTraceConverter.CheckWhenLabelAndDurationAdded
[ OK ] TestChromeTraceConverter.CheckWhenLabelAndDurationAdded (1 ms)
[ RUN ] TestChromeTraceConverter.CheckWithNameAndMultipleArgsAdded
[ OK ] TestChromeTraceConverter.CheckWithNameAndMultipleArgsAdded (0 ms)
[ RUN ] TestChromeTraceConverter.CheckWithLabelAndMultipleArgsAdded
[ OK ] TestChromeTraceConverter.CheckWithLabelAndMultipleArgsAdded (0 ms)
[----------] 9 tests from TestChromeTraceConverter (4 ms total)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
@nikhilkotian22 thanks a lot for the contribution! I noticed that the tests sometimes fail (see CI results). Would you be able to have a look? Thank you
@loganek I will fix this. I now realise that arguments are stored in an std::unordered_map
and a string comparison therefore will not work. It will be better to do a json parse and compare.