X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=unit-tests%2Ftest_descriptor-set.cpp;h=22bc5785f74e508da9f0adb4865a2bfff5eae69a;hb=refs%2Fheads%2Ftizen_7.0;hp=fb985bbcbeda9ef7ff03be85e1763ac4367f1032;hpb=69b23b422c6cd388dcd64fd69b74d1f172d1bc20;p=platform%2Fcore%2Fsecurity%2Fkey-manager.git diff --git a/unit-tests/test_descriptor-set.cpp b/unit-tests/test_descriptor-set.cpp index fb985bb..22bc578 100644 --- a/unit-tests/test_descriptor-set.cpp +++ b/unit-tests/test_descriptor-set.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 - 2020 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014-2020 Samsung Electronics Co., Ltd. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,6 +39,7 @@ #include #include +#include using namespace CKM; @@ -47,8 +48,6 @@ namespace { const int POLL_TIMEOUT = 8000; const int POLL_TIMEOUT_SHORT = 1000; -typedef std::unique_ptr> PipePtr; - const short POLLALL = std::numeric_limits::max(); void closePipe(int *fd) @@ -65,7 +64,7 @@ void closePipe(int *fd) #define PIPE(fd) \ int (fd)[2]; \ BOOST_REQUIRE_MESSAGE(0 == pipe((fd)), "Pipe creation failed: " << GetErrnoString()); \ - PipePtr fd##Ptr((fd), closePipe); + auto fd##Ptr = uptr((fd)); void unexpectedCallback(int, short) { @@ -262,10 +261,10 @@ POSITIVE_TEST_CASE(T090_WriteAfterRead) readFd(desc, fd[0], revents); descriptors.remove(desc); - descriptors.add(fd2[1], POLLOUT, [&](int desc, short revents) { + descriptors.add(fd2[1], POLLOUT, [&](int desc2, short revents2) { callback2 = true; - writeFd(desc, fd2[1], revents); - descriptors.remove(desc); + writeFd(desc2, fd2[1], revents2); + descriptors.remove(desc2); }); });