clp
clp copied to clipboard
core: Add unit test for LogEventSerializer
References
Description
Added unit test for LogEventSerializer and Deserializer
The unit test does the following:
- Encode two log events into an IR file
- Decodes the two log events from the IR file and convert them to plain text log message
- Verify that the encoded log_events and decoded log events are identical
Validation performed
New test is added to the unit test and passed
Before adding review comments, I think it's worth discussing the high-level concern here. The changes in decoding_methods.hpp/cpp should be moved to another PR for the following reasons:
- The code added in this PR is duplicating
generic_deserialize_log_event. The method itself is quite useful though (both javascript ffi and IR v2 require such a deserialize function). But we shouldn't simply duplicate code to create another function. - The current namings are quite confusing. We should distinguish which of these methods are
deserialize_xxx,decode_xxx, anddeserialize_and_decode_xxxrespectively. In this PR, we have two overloadeddeserialize_log_event, but they are not doing the same thing.