commit
717ab98788
3 changed files with 12 additions and 1 deletions
|
@ -958,7 +958,6 @@ inline std::size_t hash_value(value const& val)
|
|||
} // namespace value_adl_barrier
|
||||
|
||||
using value_adl_barrier::value;
|
||||
using value_adl_barrier::operator<<;
|
||||
|
||||
namespace detail {
|
||||
|
||||
|
|
|
@ -2,11 +2,14 @@
|
|||
|
||||
#include <mapnik/value_types.hpp>
|
||||
#include <mapnik/value.hpp>
|
||||
#include <mapnik/unicode.hpp>
|
||||
#include <mapnik/util/conversions.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <unordered_map>
|
||||
#include <sstream>
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
#include <cstdio>
|
||||
|
@ -289,6 +292,14 @@ SECTION("to string") {
|
|||
vc[val2] = 1;
|
||||
REQUIRE( vc[1] == static_cast<int>(1) );
|
||||
|
||||
// mapnik::value << to ostream
|
||||
std::stringstream s;
|
||||
mapnik::transcoder tr("utf-8");
|
||||
mapnik::value_unicode_string ustr = tr.transcode("hello world!");
|
||||
mapnik::value streamable(ustr);
|
||||
s << streamable;
|
||||
CHECK( s.str() == std::string("hello world!") );
|
||||
|
||||
}
|
||||
catch (std::exception const & ex)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "catch.hpp"
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/value.hpp>
|
||||
#include <mapnik/image_any.hpp>
|
||||
#include <mapnik/color.hpp>
|
||||
#include <mapnik/image_view_any.hpp>
|
||||
|
|
Loading…
Add table
Reference in a new issue