Skip to content

Commit

Permalink
added assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
venkat0907 committed Aug 8, 2023
1 parent af6eab7 commit d9b9c35
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions base/test/frame_factory_test_dma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,9 @@ BOOST_AUTO_TEST_CASE(memcopy_read_write)
auto frame = frameFactory->create(size, frameFactory);
void *iptr = (static_cast<DMAFDWrapper *>(frame->data()))->getHostPtr();
memset(iptr,200,size);
void *temptr = malloc(size);
memset(temptr,500,size);
memcpy(temptr,iptr,size);
std::ofstream file("data/testOutput/hola.raw", std::ios::out | std::ios::binary);
if (file.is_open())
{
LOG_ERROR << "Save File";
file.write((char*)temptr, size);
file.close();
unsigned char *bytePtr = static_cast<unsigned char *>(iptr);
for (size_t i = 0; i < size; ++i) {
BOOST_TEST(bytePtr[i] == 200);
}
}

Expand Down

0 comments on commit d9b9c35

Please sign in to comment.