From 6824fb1527ea2a679473514bb14e72a3509991b7 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 31 Mar 2013 17:30:43 -0400 Subject: [PATCH] Doc, Unit Tests - Updated DEVELOPER file to be accurate once 2.2.0 is released. - Added unit test for utf8_codepoint. The tests have been siting there for a while, and may as well be committed. Low risk. --- DEVELOPER | 11 ++++------- test/utf8.t.cpp | 7 +++++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/DEVELOPER b/DEVELOPER index 4e1a8f62c..763e2f8cf 100644 --- a/DEVELOPER +++ b/DEVELOPER @@ -179,18 +179,15 @@ Work in Progress Current Codebase Condition 'master' branch: - - 2.1.2 release, current, locked. - - '2.1.2' branch: - - Current release. Locked. + - 2.2.0 Current release, locked. '2.2.0' branch: - - Currently in beta. + - Current release. Locked. '2.3.0' branch: - - Future release with sync features, and new tasksh. + - Current development branch with sync features, and new tasksh. --- 2012-05-12 Added general statement about how to contribute. -2013-03-04 Updated branch inco. +2013-03-31 Updated branch info. diff --git a/test/utf8.t.cpp b/test/utf8.t.cpp index 4e75f1d56..be7cf4e9d 100644 --- a/test/utf8.t.cpp +++ b/test/utf8.t.cpp @@ -32,7 +32,7 @@ //////////////////////////////////////////////////////////////////////////////// int main (int argc, char** argv) { - UnitTest t (15); + UnitTest t (17); std::string ascii_text = "This is a test"; std::string utf8_text = "más sábado miércoles"; @@ -42,7 +42,10 @@ int main (int argc, char** argv) std::string utf8_text_color = "más sábado miércoles"; std::string utf8_wide_text_color = "改变各种颜色"; - // TODO unsigned int utf8_codepoint (const std::string&); + // unsigned int utf8_codepoint (const std::string&); + t.is ((int) utf8_codepoint ("\\u0020"), 32, "\\u0020 --> ' '"); + t.is ((int) utf8_codepoint ("U+0020"), 32, "U+0020 --> ' '"); + // TODO unsigned int utf8_next_char (const std::string&, std::string::size_type&); // TODO std::string utf8_character (unsigned int); // TODO int utf8_sequence (unsigned int);