Tests on IsValidSortedUnique()

This commit is contained in:
Vladimir Byko-Ianko 2017-11-29 11:54:45 +03:00 committed by Yuri Gorshenin
parent acc0b082ea
commit 03e8a4f4dc
2 changed files with 13 additions and 0 deletions

View file

@ -86,6 +86,18 @@ UNIT_TEST(Transit_HeaderRewriting)
namespace
{
UNIT_TEST(Transit_IsValidSortedUnique)
{
vector<Network> const networks = {Network(1 /* id */, "Title 1"), Network(2 /* id */, "Title 2")};
TEST(IsValidSortedUnique(networks), ());
vector<Stop> const stops(5);
TEST(!IsValidSortedUnique(stops), ());
vector<ShapeId> const shapeIds = {ShapeId(1, 2), ShapeId(1, 2)};
TEST(!IsValidSortedUnique(shapeIds), ());
}
UNIT_TEST(Transit_HeaderSerialization)
{
{

View file

@ -5,6 +5,7 @@
#include "geometry/point2d.hpp"
#include "base/newtype.hpp"
#include "base/stl_add.hpp"
#include "base/visitor.hpp"
#include <algorithm>