From a590a69bda9069b3d4a54e86a2472c613106ff48 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Wed, 22 Sep 2010 19:05:31 +0000 Subject: Minor UTF8 conversion refactoring, added as_utf8 and as_wide overloads with string arguments git-svn-id: http://pugixml.googlecode.com/svn/trunk@749 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test_unicode.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/test_unicode.cpp b/tests/test_unicode.cpp index 0b656a3..e01e031 100644 --- a/tests/test_unicode.cpp +++ b/tests/test_unicode.cpp @@ -69,6 +69,13 @@ TEST(as_wide_invalid) CHECK(b5 == L"\nbcd"); } +TEST(as_wide_string) +{ + std::string s = "abcd"; + + CHECK(as_wide(s) == L"abcd"); +} + TEST(as_utf8_empty) { CHECK(as_utf8(L"") == ""); @@ -134,4 +141,11 @@ TEST(as_utf8_invalid) #endif } } + +TEST(as_utf8_string) +{ + std::wstring s = L"abcd"; + + CHECK(as_utf8(s) == "abcd"); +} #endif -- cgit v1.2.3