C
chiku
Hi ,
I am working with file IO library and we are using google test
framework to test it .Being a beignner i am facing few issues .
My file open interface look like this
bool FileStream::Open(const string& fileName)
{
_stream->open(fileName.c_str());
if (_stream->is_open())
return true;
else
return false ;
}
where _stream is of fstream * type .
Above code seems to be giving false always when i called like
_fileName = "OpenWithValidFileName";
bool result = _fileStream->Open(_fileName);
where _fileName is of string type .
Any idea or thoughts?
Chiku
I am working with file IO library and we are using google test
framework to test it .Being a beignner i am facing few issues .
My file open interface look like this
bool FileStream::Open(const string& fileName)
{
_stream->open(fileName.c_str());
if (_stream->is_open())
return true;
else
return false ;
}
where _stream is of fstream * type .
Above code seems to be giving false always when i called like
_fileName = "OpenWithValidFileName";
bool result = _fileStream->Open(_fileName);
where _fileName is of string type .
Any idea or thoughts?
Chiku