Skip to content

Commit fed43a6

Browse files
committed
Remove uneccessary cast in test_swap
The cast is actually wrong as the return value of `get` is `int` already.
1 parent a0327e0 commit fed43a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/test_fstream_special.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ void test_swap(const char* filename, const char* filename2)
222222
{
223223
const int curChar1 = f1.peek();
224224
const int curChar2 = f2.peek();
225+
TEST_CONTEXT("ctr " << ctr << ": c1=" << curChar1 << " c2=" << curChar2);
225226
// Randomly do a no-op seek of either or both streams to flush internal buffer
226227
if(ctr % 10 == 0)
227228
TEST(f1.seekg(f1.tellg()));
@@ -234,9 +235,9 @@ void test_swap(const char* filename, const char* filename2)
234235
TEST(f1.seekg(f1.tellg()));
235236
else if(ctr % 15 == 4)
236237
TEST(f2.seekg(f2.tellg()));
237-
TEST_EQ(f1.get(), char(curChar2));
238+
TEST_EQ(f1.get(), curChar2);
238239
f1.swap(f2);
239-
TEST_EQ(f1.get(), char(curChar1));
240+
TEST_EQ(f1.get(), curChar1);
240241
++ctr;
241242
}
242243
}

0 commit comments

Comments
 (0)