swh:1:snp:ff2a11cd2e44dd19ec3814028ef2ce6605664e63
Raw File
Tip revision: e1655941cc2d1d35d1b7f7a8d4b0fbc8215ac6d6 authored by Eric Fischer on 17 October 2016, 20:53:52 UTC
Add a test where the base zoom is beyond the max zoom
Tip revision: e165594
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