Skip to content

Commit

Permalink
test: Fix compilation of test.cpp and bump cmake min version support …
Browse files Browse the repository at this point in the history
…to 3.30
  • Loading branch information
Tradias committed Sep 10, 2024
1 parent 553ce0a commit edeb2d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.14...3.27)
cmake_minimum_required(VERSION 3.14...3.30)

# Hunter package manager options
option(HUNTER_ENABLED "Enable Hunter package manager" off)
Expand Down
1 change: 1 addition & 0 deletions example/snippets/alarm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ asio::awaitable<void> timer_with_different_completion_tokens(agrpc::GrpcContext&
/* [agrpc-alarm] */
asio::awaitable<void> agrpc_alarm(agrpc::GrpcContext& grpc_context)
{
// used GrpcContext is explicit:
agrpc::Alarm alarm{grpc_context};
bool wait_ok = co_await alarm.wait(
std::chrono::system_clock::now() + std::chrono::seconds(1), asio::use_awaitable);
Expand Down
4 changes: 2 additions & 2 deletions test/utils/utils/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ void set_up_unary_test(MockTest& test)
});
EXPECT_CALL(test.stub, PrepareAsyncUnaryRaw)
.WillOnce(
[reader = std::move(mock_reader)](auto&&...)
[reader = std::make_shared<decltype(mock_reader)>(std::move(mock_reader))](auto&&...)
{
// GRPC wraps the return value into a unique_ptr with a specialized std::default_delete that does
// nothing
return reader.get();
return reader->get();
});
}

Expand Down

0 comments on commit edeb2d3

Please sign in to comment.