forked from organicmaps/organicmaps
Fix tests and asserts
This commit is contained in:
parent
4d6d9837ea
commit
8909791df1
2 changed files with 4 additions and 3 deletions
|
@ -29,9 +29,10 @@ SourceReader::SourceReader()
|
|||
}
|
||||
|
||||
SourceReader::SourceReader(string const & filename)
|
||||
: m_file(unique_ptr<istream, Deleter>(new ifstream(filename), Deleter()))
|
||||
{
|
||||
CHECK(!m_filename.empty() , ("Filename can't be empty"));
|
||||
CHECK(!filename.empty() , ("Filename can't be empty"));
|
||||
m_file = unique_ptr<istream, Deleter>(new ifstream(filename), Deleter());
|
||||
CHECK(static_cast<ifstream *>(m_file.get())->is_open() , ("Can't open file:", filename));
|
||||
LOG_SHORT(LINFO, ("Reading OSM data from", filename));
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ void BaseOSMParser::AddAttr(string const & key, string const & value)
|
|||
|
||||
bool BaseOSMParser::Push(string const & tagName)
|
||||
{
|
||||
ASSERT_GREATER(tagName.size(), 2, ());
|
||||
ASSERT_GREATER_OR_EQUAL(tagName.size(), 2, ());
|
||||
|
||||
// As tagKey we use first two char of tag name.
|
||||
XMLElement::ETag tagKey = XMLElement::ETag(*reinterpret_cast<uint16_t const *>(tagName.data()));
|
||||
|
|
Loading…
Add table
Reference in a new issue