Adding url unit test for "sides" parameters

Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
This commit is contained in:
FILLAU Jean-Maxime
2017-05-18 10:37:45 +02:00
committed by Patrick Niklaus
parent ba2bf4f78e
commit 2de17f3fd0
3 changed files with 77 additions and 0 deletions
+21
View File
@@ -55,7 +55,28 @@ struct Side
else
return BOTH;
}
static std::string toString(const Side &side)
{
switch(side.side)
{
case(DEFAULT) :
return "0";
case(OPPOSITE) :
return "d";
case(BOTH) :
return "b";
default :
//TODO I don't know what to do here.
return "b";
}
}
};
inline bool operator==(const Side lhs, const Side rhs)
{
return lhs.side == rhs.side;
}
inline bool operator!=(const Side lhs, const Side rhs) { return !(lhs == rhs); }
}
}