mapnik/test/unit/numerics/enumeration.cpp

17 lines
441 B
C++
Raw Normal View History

#include "catch.hpp"
#include <mapnik/enumeration.hpp>
2016-02-16 21:30:40 +01:00
#include <mapnik/symbolizer_enumerations.hpp>
#include <sstream>
2022-01-26 23:25:53 +01:00
TEST_CASE("enumeration")
{
2022-12-09 18:17:17 +01:00
mapnik::line_cap_e e(mapnik::line_cap_enum::ROUND_CAP);
2022-01-26 23:25:53 +01:00
CHECK(e.as_string() == "round");
// note: test the << operator, which calls `as_string` internally
// is not used in mapnik, but kept for back compat
std::stringstream s;
s << e;
CHECK(s.str() == "round");
2017-05-05 13:02:01 +02:00
}