aboutsummaryrefslogtreecommitdiff
path: root/src/timelineDecoder/tests/TimelineTests.cpp
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2020-03-05 16:25:28 +0000
committerKeith Davis Arm <keith.davis@arm.com>2020-03-09 16:11:25 +0000
commit97da5e2e6c8aaaf4249af60e8305431315226f15 (patch)
treec36f01055cbf0f9577bca95f64ca6de42c923a77 /src/timelineDecoder/tests/TimelineTests.cpp
parent53d092d34c1e9924151d8d3a228c04620c1baf5c (diff)
downloadarmnn-97da5e2e6c8aaaf4249af60e8305431315226f15.tar.gz
IVGCVSW-4541 Modify Timeline Packet construction
* Changed TimelinePacket encoding so that there is only one header for multiple timeline swtrace messages * Refactored function names to have more suitable description * Refactored CodeStyle to coincide with ArmNN coding standards * Refactored profiling test names to be descriptive * Refactored ErrorCode name to TimelineStatus * Updated existing unit tests Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I83bd4bb9e7393617bca97eba96a6e1388916e5b0
Diffstat (limited to 'src/timelineDecoder/tests/TimelineTests.cpp')
-rw-r--r--src/timelineDecoder/tests/TimelineTests.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/timelineDecoder/tests/TimelineTests.cpp b/src/timelineDecoder/tests/TimelineTests.cpp
index 052a3f12ff..02d93c3caa 100644
--- a/src/timelineDecoder/tests/TimelineTests.cpp
+++ b/src/timelineDecoder/tests/TimelineTests.cpp
@@ -31,7 +31,6 @@ void SendTimelinePacketToCommandHandler(const unsigned char* packetBuffer,
offset += uint32_t_size;
header[1] = profiling::ReadUint32(packetBuffer, offset);
offset += uint32_t_size;
-
uint32_t PacketDataLength = header[1] & 0x00FFFFFF;
auto uniquePacketData = std::make_unique<unsigned char[]>(PacketDataLength);
@@ -155,15 +154,14 @@ BOOST_AUTO_TEST_CASE(TimelineCaptureTest)
TimelineCaptureCommandHandler timelineCaptureCommandHandler(
1, 1, packetVersionResolver.ResolvePacketVersion(1, 1).GetEncodedValue(), timelineDecoder, threadIdSize);
- BOOST_CHECK(timelineDecoder.SetEntityCallback(PushEntity) == ITimelineDecoder::ErrorCode::ErrorCode_Success);
- BOOST_CHECK(
- timelineDecoder.SetEventClassCallback(PushEventClass) == ITimelineDecoder::ErrorCode::ErrorCode_Success);
- BOOST_CHECK(timelineDecoder.SetEventCallback(PushEvent) == ITimelineDecoder::ErrorCode::ErrorCode_Success);
- BOOST_CHECK(timelineDecoder.SetLabelCallback(PushLabel) == ITimelineDecoder::ErrorCode::ErrorCode_Success);
- BOOST_CHECK(
- timelineDecoder.SetRelationshipCallback(PushRelationship) == ITimelineDecoder::ErrorCode::ErrorCode_Success);
+ using Status = ITimelineDecoder::TimelineStatus;
+ BOOST_CHECK(timelineDecoder.SetEntityCallback(PushEntity) == Status::TimelineStatus_Success);
+ BOOST_CHECK(timelineDecoder.SetEventClassCallback(PushEventClass) == Status::TimelineStatus_Success);
+ BOOST_CHECK(timelineDecoder.SetEventCallback(PushEvent) == Status::TimelineStatus_Success);
+ BOOST_CHECK(timelineDecoder.SetLabelCallback(PushLabel) == Status::TimelineStatus_Success);
+ BOOST_CHECK(timelineDecoder.SetRelationshipCallback(PushRelationship) == Status::TimelineStatus_Success);
- const uint64_t entityGuid = 111111u ;
+ const uint64_t entityGuid = 111111u;
const uint64_t eventClassGuid = 22222u;
const uint64_t timestamp = 33333u;
const uint64_t eventGuid = 44444u;