File tree Expand file tree Collapse file tree 3 files changed +12
-25
lines changed
Expand file tree Collapse file tree 3 files changed +12
-25
lines changed Original file line number Diff line number Diff line change 5353 run : cmake --build . --config ${{ matrix.build_type }} --target test_sparrow_ipc_lib
5454
5555 - name : Run tests
56- id : run_tests_step
5756 working-directory : build
5857 run : |
59- cmake --build . --config ${{ matrix.build_type }} --target run_tests
60- continue-on-error : true
61-
62- - name : Display test log on failure
63- if : steps.run_tests_step.outcome == 'failure'
64- working-directory : build
65- run : |
66- echo "Test run failed. Displaying log file:"
67- cat ./tests/Testing/Temporary/LastTest.log
58+ cmake --build . --config ${{ matrix.build_type }} --target run_tests_with_junit_report
6859
6960 - name : Build example
7061 working-directory : build
Original file line number Diff line number Diff line change @@ -36,21 +36,13 @@ namespace sparrow_ipc
3636 template <std::ranges::input_range R>
3737 [[nodiscard]] bool is_continuation (const R& buf)
3838 {
39- if (std::ranges::size (buf) != continuation.size ())
40- {
41- return false ;
42- }
43- return std::equal (std::ranges::begin (buf), std::ranges::end (buf), continuation.begin ());
39+ return std::ranges::equal (buf, continuation);
4440 }
4541
4642 template <std::ranges::input_range R>
4743 [[nodiscard]] bool is_end_of_stream (const R& buf)
4844 {
49- if (std::ranges::size (buf) != end_of_stream.size ())
50- {
51- return false ;
52- }
53- return std::equal (std::ranges::begin (buf), std::ranges::end (buf), end_of_stream.begin ());
45+ return std::ranges::equal (buf, end_of_stream);
5446 }
5547
5648 template <std::ranges::input_range R>
Original file line number Diff line number Diff line change @@ -10,10 +10,14 @@ namespace sparrow_ipc
1010 {
1111 std::vector<sparrow::metadata_pair> sparrow_metadata;
1212 sparrow_metadata.reserve (metadata.size ());
13- for (const auto & kv : metadata)
14- {
15- sparrow_metadata.emplace_back (kv->key ()->str (), kv->value ()->str ());
16- }
13+ std::ranges::transform (
14+ metadata,
15+ std::back_inserter (sparrow_metadata),
16+ [](const auto & kv)
17+ {
18+ return sparrow::metadata_pair{kv->key ()->str (), kv->value ()->str ()};
19+ }
20+ );
1721 return sparrow_metadata;
1822 }
19- }
23+ }
You can’t perform that action at this time.
0 commit comments