Skip to content

Commit 39ac12c

Browse files
sadyrovgouriano
authored andcommitted
Fix for Cygwin/older Boost. JIRA CXX-13855
git-svn-id: https://anonsvn.ncbi.nlm.nih.gov/repos/v1/trunk/c++@104417 78c7ea69-d796-4a43-9a09-de51944f1b03
1 parent 15548d2 commit 39ac12c

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

src/connect/test/test_ncbi_sftp.cpp

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,11 @@ struct SDefaultDirFixture
140140
template <class... TArgs>
141141
void Test(iostream& s, string_view command, TArgs&&... args)
142142
{
143-
BOOST_TEST_INFO_SCOPE(command);
144-
s << command << endl;
145-
x_Test(s, std::forward<TArgs>(args)...);
146-
s.clear();
143+
BOOST_TEST_CONTEXT(command) {
144+
s << command << endl;
145+
x_Test(s, std::forward<TArgs>(args)...);
146+
s.clear();
147+
}
147148
}
148149

149150
template <class... TArgs>
@@ -155,9 +156,10 @@ struct SDefaultDirFixture
155156
template <class... TArgs>
156157
void TestNoCommand(iostream& s, TArgs&&... args)
157158
{
158-
BOOST_TEST_INFO_SCOPE("No command");
159-
x_Test(s, std::forward<TArgs>(args)...);
160-
s.clear();
159+
BOOST_TEST_CONTEXT("No command") {
160+
x_Test(s, std::forward<TArgs>(args)...);
161+
s.clear();
162+
}
161163
}
162164

163165
private:
@@ -169,11 +171,12 @@ struct SDefaultDirFixture
169171

170172
void x_Test(iostream& s, string_view expected)
171173
{
172-
BOOST_TEST_INFO_SCOPE("With expected=" << expected);
173-
BOOST_CHECK(getline(s, line));
174-
BOOST_CHECK_EQUAL(line, expected);
175-
BOOST_CHECK(!getline(s, line));
176-
BOOST_CHECK_EQUAL(s.rdstate(), ios_base::failbit | ios_base::eofbit);
174+
BOOST_TEST_CONTEXT("With expected=" << expected) {
175+
BOOST_CHECK(getline(s, line));
176+
BOOST_CHECK_EQUAL(line, expected);
177+
BOOST_CHECK(!getline(s, line));
178+
BOOST_CHECK_EQUAL(s.rdstate(), ios_base::failbit | ios_base::eofbit);
179+
}
177180
}
178181

179182
void x_Test(iostream& s, set<string> expected)
@@ -200,9 +203,10 @@ struct SDefaultDirFixture
200203

201204
void x_Test(iostream& s, string_view data, string_view expected)
202205
{
203-
BOOST_TEST_INFO_SCOPE("With data=" << data);
204-
s << data;
205-
x_Test(s, expected);
206+
BOOST_TEST_CONTEXT("With data=" << data) {
207+
s << data;
208+
x_Test(s, expected);
209+
}
206210
}
207211
};
208212

0 commit comments

Comments
 (0)