Unittest: fix compiler warning: unused variable.
parent
6813ed49bb
commit
2038d01f22
|
@ -61,10 +61,10 @@ TEST_F( IOStreamBufferTest, creationTest ) {
|
||||||
|
|
||||||
TEST_F( IOStreamBufferTest, accessCacheSizeTest ) {
|
TEST_F( IOStreamBufferTest, accessCacheSizeTest ) {
|
||||||
IOStreamBuffer<char> myBuffer1;
|
IOStreamBuffer<char> myBuffer1;
|
||||||
EXPECT_NE( 0, myBuffer1.cacheSize() );
|
EXPECT_NE( 0U, myBuffer1.cacheSize() );
|
||||||
|
|
||||||
IOStreamBuffer<char> myBuffer2( 100 );
|
IOStreamBuffer<char> myBuffer2( 100 );
|
||||||
EXPECT_EQ( 100, myBuffer2.cacheSize() );
|
EXPECT_EQ( 100U, myBuffer2.cacheSize() );
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F( IOStreamBufferTest, open_close_Test ) {
|
TEST_F( IOStreamBufferTest, open_close_Test ) {
|
||||||
|
@ -77,6 +77,7 @@ TEST_F( IOStreamBufferTest, open_close_Test ) {
|
||||||
tmpnam( buffer );
|
tmpnam( buffer );
|
||||||
std::FILE *fs( std::fopen( buffer, "w+" ) );
|
std::FILE *fs( std::fopen( buffer, "w+" ) );
|
||||||
size_t written( std::fwrite( buffer, 1, sizeof( char ) * L_tmpnam, fs ) );
|
size_t written( std::fwrite( buffer, 1, sizeof( char ) * L_tmpnam, fs ) );
|
||||||
|
EXPECT_NE( 0U, written );
|
||||||
std::fflush( fs );
|
std::fflush( fs );
|
||||||
|
|
||||||
TestDefaultIOStream myStream( fs, buffer );
|
TestDefaultIOStream myStream( fs, buffer );
|
||||||
|
@ -91,10 +92,11 @@ TEST_F( IOStreamBufferTest, readlineTest ) {
|
||||||
tmpnam( buffer );
|
tmpnam( buffer );
|
||||||
std::FILE *fs( std::fopen( buffer, "w+" ) );
|
std::FILE *fs( std::fopen( buffer, "w+" ) );
|
||||||
size_t written( std::fwrite( buffer, 1, sizeof( char ) * L_tmpnam, fs ) );
|
size_t written( std::fwrite( buffer, 1, sizeof( char ) * L_tmpnam, fs ) );
|
||||||
|
EXPECT_NE( 0U, written );
|
||||||
std::fflush( fs );
|
std::fflush( fs );
|
||||||
|
|
||||||
IOStreamBuffer<char> myBuffer( 26 );
|
IOStreamBuffer<char> myBuffer( 26 );
|
||||||
EXPECT_EQ( 26, myBuffer.cacheSize() );
|
EXPECT_EQ( 26U, myBuffer.cacheSize() );
|
||||||
|
|
||||||
TestDefaultIOStream myStream( fs, buffer );
|
TestDefaultIOStream myStream( fs, buffer );
|
||||||
size_t size( myStream.FileSize() );
|
size_t size( myStream.FileSize() );
|
||||||
|
@ -110,3 +112,4 @@ TEST_F( IOStreamBufferTest, readlineTest ) {
|
||||||
TEST_F( IOStreamBufferTest, accessBlockIndexTest ) {
|
TEST_F( IOStreamBufferTest, accessBlockIndexTest ) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue