Skip to content

Conversation

@nkhlktn
Copy link

@nkhlktn nkhlktn commented Nov 4, 2020

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.

@loganek
Copy link
Member

loganek commented Nov 4, 2020

@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

@nkhlktn
Copy link
Author

nkhlktn commented Nov 6, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants