Skip to content

Commit b4c1015

Browse files
committed
Merge branch 'develop'
2 parents 9f9f012 + 1e6badc commit b4c1015

File tree

6 files changed

+37
-23
lines changed

6 files changed

+37
-23
lines changed

.appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ environment:
121121
configuration: Debug
122122
BOOST_ROOT: C:\Libraries\boost_1_60_0
123123
- CMAKE: true
124-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
125-
GENERATOR: Visual Studio 16 2019
124+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
125+
GENERATOR: Visual Studio 17 2022
126126
configuration: Debug
127-
BOOST_ROOT: C:\Libraries\boost_1_73_0
127+
BOOST_ROOT: C:\Libraries\boost_1_77_0
128128

129129
# Coverity
130130
- COVERITY: true

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
git config --global pack.threads 0
115115
! command -v cmake &> /dev/null || echo "B2_FLAGS=--nowide-enable-cmake" >> $GITHUB_ENV
116116
117-
- uses: actions/checkout@v2
117+
- uses: actions/checkout@v3
118118
with:
119119
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
120120
fetch-depth: ${{ matrix.coverage && '0' || '1' }}
@@ -127,7 +127,7 @@ jobs:
127127
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}
128128

129129
- name: Fetch Boost.CI
130-
uses: actions/checkout@v2
130+
uses: actions/checkout@v3
131131
with:
132132
repository: boostorg/boost-ci
133133
ref: master
@@ -236,7 +236,7 @@ jobs:
236236
runs-on: windows-latest
237237

238238
steps:
239-
- uses: actions/checkout@v2
239+
- uses: actions/checkout@v3
240240

241241
- name: Setup MSYS2 environment
242242
uses: msys2/setup-msys2@v2
@@ -247,7 +247,7 @@ jobs:
247247
pacboy: gcc:p cmake:p ninja:p
248248

249249
- name: Fetch Boost.CI
250-
uses: actions/checkout@v2
250+
uses: actions/checkout@v3
251251
with:
252252
repository: boostorg/boost-ci
253253
ref: master
@@ -296,9 +296,9 @@ jobs:
296296
runs-on: ${{matrix.os}}
297297

298298
steps:
299-
- uses: actions/checkout@v2
299+
- uses: actions/checkout@v3
300300
- name: Fetch Boost.CI
301-
uses: actions/checkout@v2
301+
uses: actions/checkout@v3
302302
with:
303303
repository: boostorg/boost-ci
304304
ref: master

.github/workflows/ci_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
DEP_DIR: ${{github.workspace}}/dependencies
4949
BOOST_VERSION: 1.56.0
5050
steps:
51-
- uses: actions/checkout@v2
51+
- uses: actions/checkout@v3
5252
- name: Sanity check version
5353
run: grep -E 'set\(_version [0-9]' CMakeLists.txt
5454
- uses: actions/cache@v1
@@ -64,7 +64,7 @@ jobs:
6464
if: matrix.standalone == 'Boost'
6565
run: echo "BOOST_ROOT=${DEP_DIR//\\/\/}/boost_${BOOST_VERSION//./_}" >> $GITHUB_ENV
6666
# Install Boost
67-
- uses: actions/checkout@v2
67+
- uses: actions/checkout@v3
6868
if: matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true'
6969
with:
7070
repository: boostorg/boost
@@ -128,9 +128,9 @@ jobs:
128128
CreateBoostDocuTest:
129129
runs-on: ubuntu-latest
130130
steps:
131-
- uses: actions/checkout@v2
131+
- uses: actions/checkout@v3
132132
- name: Fetch Boost.CI
133-
uses: actions/checkout@v2
133+
uses: actions/checkout@v3
134134
with:
135135
repository: boostorg/boost-ci
136136
ref: master
@@ -147,7 +147,7 @@ jobs:
147147
CheckFormatting:
148148
runs-on: ubuntu-latest
149149
steps:
150-
- uses: actions/checkout@v2
150+
- uses: actions/checkout@v3
151151
- uses: DoozyX/clang-format-lint-action@v0.11
152152
with:
153153
exclude: './doc'

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
DEP_DIR: ${{github.workspace}}/dependencies
1919
BOOST_VERSION: 1.56.0
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2222
- name: Extract tag name
2323
id: get_tag
2424
run: |

.github/workflows/update_standalone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: Update standalone branch
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2020
- name: Setup git
2121
run: |
2222
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"

test/test_iostream.cpp

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,13 @@ class RedirectStdio
381381
{
382382
if(handleType == STD_INPUT_HANDLE)
383383
{
384-
h = CreateFile("CONIN$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
384+
h = CreateFile("CONIN$",
385+
GENERIC_READ | GENERIC_WRITE,
386+
FILE_SHARE_READ | FILE_SHARE_WRITE,
387+
nullptr,
388+
OPEN_EXISTING,
389+
0,
390+
0);
385391
} else
386392
{
387393
h = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE,
@@ -408,7 +414,7 @@ class RedirectStdio
408414
CONSOLE_SCREEN_BUFFER_INFO info;
409415
TEST(GetConsoleScreenBufferInfo(h, &info));
410416
TEST(info.dwSize.X > 0 && info.dwSize.Y > 0);
411-
nw::cout << "Mock console buffer size: " << info.dwSize.X << "x" << info.dwSize.Y << "\n";
417+
std::cout << "Mock console buffer size: " << info.dwSize.X << "x" << info.dwSize.Y << "\n";
412418

413419
std::wstring result;
414420
std::vector<wchar_t> buffer(info.dwSize.X);
@@ -426,7 +432,7 @@ class RedirectStdio
426432
return result;
427433
}
428434

429-
void setBufferData(std::wstring data, int)
435+
void setBufferData(const std::wstring& data)
430436
{
431437
std::vector<INPUT_RECORD> buffer;
432438
buffer.reserve(data.size() * 2 + 2);
@@ -460,22 +466,29 @@ class RedirectStdio
460466

461467
void test_console()
462468
{
463-
// cin
469+
std::cout << "Test cin console: " << std::flush;
464470
{
465471
RedirectStdio stdinHandle(STD_INPUT_HANDLE);
472+
std::cout << "stdin redirected, " << std::flush;
466473
// Recreate to react on redirected streams
467474
decltype(nw::cin) cin(nullptr);
475+
std::cout << "cin recreated " << std::flush;
468476
TEST(cin.rdbuf() != std::cin.rdbuf());
477+
std::cout << "and validated" << std::endl;
469478
const std::string testStringIn1 = "Hello std in ";
470479
const std::string testStringIn2 = "\xc3\xa4 - \xc3\xb6 - \xc3\xbc - \xd0\xbc - \xce\xbd";
471-
stdinHandle.setBufferData(nw::widen(testStringIn1 + "\n" + testStringIn2 + "\n"), 0);
480+
std::cout << "Setting mock buffer data" << std::endl;
481+
stdinHandle.setBufferData(nw::widen(testStringIn1 + "\n" + testStringIn2 + "\n"));
482+
std::cout << "Done" << std::endl;
472483
std::string line;
473484
TEST(std::getline(cin, line));
485+
std::cout << "ASCII line read" << std::endl;
474486
TEST_EQ(line, testStringIn1);
475487
TEST(std::getline(cin, line));
488+
std::cout << "UTF-8 line read" << std::endl;
476489
TEST_EQ(line, testStringIn2);
477490
}
478-
// cout
491+
std::cout << "Test cout console" << std::endl;
479492
{
480493
RedirectStdio stdoutHandle(STD_OUTPUT_HANDLE);
481494
decltype(nw::cout) cout(true, nullptr);
@@ -487,7 +500,7 @@ void test_console()
487500
const auto data = stdoutHandle.getBufferData();
488501
TEST_EQ(data, nw::widen(testString));
489502
}
490-
// cerr
503+
std::cout << "Test cerr console" << std::endl;
491504
{
492505
RedirectStdio stderrHandle(STD_ERROR_HANDLE);
493506

@@ -500,6 +513,7 @@ void test_console()
500513
const auto data = stderrHandle.getBufferData();
501514
TEST_EQ(data, nw::widen(testString));
502515
}
516+
std::cout << "Console tests done" << std::endl;
503517
}
504518

505519
#else

0 commit comments

Comments
 (0)