https://github.com/mapbox/tippecanoe
Raw File
Tip revision: c87d6eadfcfcb7b385b0968f47e3934554a1ea1b authored by Eric Fischer on 03 January 2017, 20:18:40 UTC
Associate attributes with the right layer when explicitly tagged (#342)
Tip revision: c87d6ea
unit.cpp
#define CATCH_CONFIG_MAIN
#include "catch/catch.hpp"
#include "text.hpp"

TEST_CASE("UTF-8 enforcement", "[utf8]") {
	REQUIRE(check_utf8("") == std::string(""));
	REQUIRE(check_utf8("hello world") == std::string(""));
	REQUIRE(check_utf8("Καλημέρα κόσμε") == std::string(""));
	REQUIRE(check_utf8("こんにちは 世界") == std::string(""));
	REQUIRE(check_utf8("👋🌏") == std::string(""));
	REQUIRE(check_utf8("Hola m\xF3n") == std::string("\"Hola m\xF3n\" is not valid UTF-8 (0xF3 0x6E)"));
}
back to top