added some tests

This commit is contained in:
Arvid Norberg
2005-08-11 11:06:52 +00:00
parent 713dad845d
commit 8a90767be8
9 changed files with 404 additions and 13 deletions

View File

@@ -198,6 +198,25 @@ namespace libtorrent
m_type = int_t;
}
bool entry::operator==(entry const& e) const
{
if (m_type != e.m_type) return false;
switch(m_type)
{
case int_t:
return integer() == e.integer();
case string_t:
return string() == e.string();
case list_t:
return list() == e.list();
case dictionary_t:
return dict() == e.dict();
default:
assert(m_type == undefined_t);
return true;
}
}
void entry::construct(data_type t)
{