diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-09-22 19:05:31 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-09-22 19:05:31 +0000 |
commit | a590a69bda9069b3d4a54e86a2472c613106ff48 (patch) | |
tree | 76ae86f39e2e269b9728ab735e1a7fcb2bbf7d8f /tests/test_unicode.cpp | |
parent | ac31030886749eafe01d5102ea3f5eb303a9af3d (diff) |
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
Diffstat (limited to 'tests/test_unicode.cpp')
-rw-r--r-- | tests/test_unicode.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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 |