Bug 1018473. Unit test for duplicate trickle candidates. r=bwc

This commit is contained in:
EKR 2014-05-31 12:06:45 -07:00
parent baaf6d91b7
commit 7afad1293c

View File

@ -477,6 +477,12 @@ TestObserver::OnIceCandidate(uint16_t level,
{
std::cout << name << ": onIceCandidate [" << level << "/"
<< mid << "] " << candidate << std::endl;
// Check for duplicates.
for (auto it = candidates.begin(); it != candidates.end(); ++it) {
EXPECT_NE(*it, candidate) << "Duplicate candidate";
}
candidates.push_back(candidate);
return NS_OK;
}