diff --git a/libdmabufheap/test/unittest/libdmabufheap/dmabuf_alloc_test.cpp b/libdmabufheap/test/unittest/libdmabufheap/dmabuf_alloc_test.cpp index 72dcd2e6ba274df4b3d103016311769a74c081a1..e6daa2e8999e4c29f0f947e2b9d415d7fbfc66e6 100644 --- a/libdmabufheap/test/unittest/libdmabufheap/dmabuf_alloc_test.cpp +++ b/libdmabufheap/test/unittest/libdmabufheap/dmabuf_alloc_test.cpp @@ -13,24 +13,25 @@ * limitations under the License. */ -#include "gtest/gtest.h" -#include -#include +#include +#include #include -#include +#include #include #include #include #include #include -#include +#include +#include "gtest/gtest.h" #include "dmabuf_alloc.h" -#define BUFFER_SIZE 128 - using namespace testing; using namespace testing::ext; +namespace { +const int BUFFER_SIZE = 128; + class DmabufAllocTest : public testing::Test { public: static void SetUpTestCase(); @@ -120,7 +121,7 @@ HWTEST_F(DmabufAllocTest, ShareBufferBetweenProcess, Function|MediumTest|Level1) exit(EXIT_SUCCESS); } /* parent process */ - waitpid(pid, NULL, 0); + waitpid(pid, nullptr, 0); ASSERT_EQ(0, DmabufHeapBufferSyncStart(buffer.fd, DMA_BUF_HEAP_BUF_SYNC_RW)); @@ -258,4 +259,5 @@ HWTEST_F(DmabufAllocTest, ExchangeBufferSyncOrder, Function|MediumTest|Level1) ASSERT_EQ(0, DmabufHeapBufferFree(&buffer)); ASSERT_EQ(0, DmabufHeapClose(heapFd)); +} } \ No newline at end of file