Index: lang/cplusplus/i3/src/Test1.cpp
===================================================================
--- lang/cplusplus/i3/src/Test1.cpp (revision 17736)
+++ lang/cplusplus/i3/src/Test1.cpp (revision 18001)
@@ -31,207 +31,4 @@
              const char* in_encoding,
              const char* out_encoding);
-    }
-}
-
-#define len basic_strnlen
-#define cat_s basic_strcat_s
-#define cpy_s basic_strcpy_s
-
-BOOST_AUTO_TEST_CASE(len_sdofjikm) {
-    BOOST_CHECK(len("0", 1) == 1);
-    BOOST_CHECK(len("Xo", 1) == 1);
-    BOOST_CHECK(len("foo", 3) == 3);
-    BOOST_CHECK(len("0123456789", 8) == 8);
-
-    BOOST_CHECK(len("", 1) == 0);
-    BOOST_CHECK(len("X", 2) == 1);
-    BOOST_CHECK(len("foo", 4) == 3);
-    BOOST_CHECK(len("0123456789", 10));
-
-    int a0[] = {0};
-    int a1[] = {1,0};
-    int a2[] = {1,2,0};
-    int a5[] = {1,2,3,4,5,0};
-
-    BOOST_CHECK(len(a1, 1) == 1);
-    BOOST_CHECK(len(a2, 1) == 1);
-    BOOST_CHECK(len(a5, 2) == 2);
-
-    BOOST_CHECK(len(a0, 1) == 0);
-    BOOST_CHECK(len(a1, 2) == 1);
-    BOOST_CHECK(len(a2, 3) == 2);
-    BOOST_CHECK(len(a5, 6) == 5);
-}
-
-
-#define DEFINE_BUFFERS      \
-    char buf1[1] = {8};     \
-    int  ibuf1[1] = {9};    \
-    char buf2[2] = {0,4};   \
-    int  ibuf2[2] = {5,0};  \
-    char buf10[10] = {7,8,9,10,11,0,13,14,15,16};      \
-    int  ibuf10[10] = {17,18,19,20,0,22,23,24,25,26}; \
-    char nebuf1[1] = {1};     \
-    int  neibuf10[10] = {17,18,19,20,21,22,23,24,25,26}; \
-    char ebuf1[1] = {0};     \
-    int  eibuf1[1] = {0};    \
-    char ebuf2[2] = {3,0};   \
-    int  eibuf2[2] = {0,3};  \
-    char ebuf10[10] = {0,8,9,0,11,12,13,0,15,16};      \
-    int  eibuf10[10] = {9,0,19,20,21,0,23,24,25,26};
-
-BOOST_AUTO_TEST_CASE(cat_dofij) {
-    const char src1[1] = "";
-    const int isrc1[1] = {0};
-    const char src2[2] = "f";
-    const int isrc2[2] = {60, 0};
-    const char src10[10] = "abcdefghi";
-    const int isrc10[10] = {60, 61, 62, 63, 64, 65, 66, 67, 68, 0};
-    typedef std::basic_string<int> istring;
-    using std::string;
-    {
-        DEFINE_BUFFERS;
-        BOOST_CHECK(cat_s<char>(0, 5/*any*/, 0/*any*/)           == EINVAL);
-        BOOST_CHECK(cat_s<int>(0, 5/*any*/, 0/*any*/)            == EINVAL);
-        BOOST_CHECK(cat_s<char>(nebuf1, 5/*any*/, 0/*any*/)      == EINVAL);
-        BOOST_CHECK(cat_s<int>(neibuf10, 5/*any*/, 0/*any*/)     == EINVAL);
-        BOOST_CHECK(cat_s<char>(0, 0/*any*/, src1 /*any*/)       == EINVAL);
-        BOOST_CHECK(cat_s<int>(neibuf10, 1/*any*/, isrc1/*any*/) == EINVAL);
-
-        BOOST_CHECK(cat_s<char>(ebuf1/*any*/,  5/*any*/,  0)  == EINVAL);
-        BOOST_CHECK(cat_s<int>(eibuf2/*any*/,  5/*any*/,  0)  == EINVAL);
-        BOOST_CHECK(cat_s<char>(ebuf10/*any*/, 0/*any*/,  0)  == EINVAL);
-        BOOST_CHECK(cat_s<int>(eibuf1/*any*/,  0/*any*/,  0)  == EINVAL);
-    } 
-
-    {
-        DEFINE_BUFFERS;
-        BOOST_CHECK(cat_s<char>(ebuf1, 0, src1)   == ERANGE);
-        BOOST_CHECK(cat_s<int>(eibuf1, 0, isrc1)  == ERANGE);
-        BOOST_CHECK(cat_s<char>(ebuf1, 1, src10)  == ERANGE);
-        BOOST_CHECK(cat_s<int>(eibuf1, 1, isrc10) == ERANGE);
-        BOOST_CHECK(cat_s<char>(buf2, 2, src10)   == ERANGE);
-        BOOST_CHECK(cat_s<int>(eibuf2, 2, isrc10) == ERANGE);
-    }
-    {
-        char dst[] = {0,1,2,3,4,5}; const char src[] = {10,10,0};
-        string result = string(dst)+src;BOOST_CHECK(cat_s<char>(dst, _countof(dst), src) == 0);BOOST_CHECK(string(dst) == result); }
-    {
-        char dst[] = {1,1,0,3,4,5}; const char src[] = {10,10,0};
-        string result = string(dst)+src;BOOST_CHECK(cat_s<char>(dst, _countof(dst), src) == 0);BOOST_CHECK(string(dst) == result); }
-    {
-        char dst[] = {0,1,2,0,4,5}; const char src[] = {10,0};
-        string result = string(dst)+src;BOOST_CHECK(cat_s<char>(dst, _countof(dst), src) == 0);BOOST_CHECK(string(dst) == result); }
-    {
-        char dst[] = {1,1,2,3,4,0}; const char src[] = {0};
-        string result = string(dst)+src;BOOST_CHECK(cat_s<char>(dst, _countof(dst), src) == 0);BOOST_CHECK(string(dst) == result); }
-    {
-        char dst[] = {0,1,2,3,0,5}; const char src[] = {10, 0};
-        string result = string(dst)+src;BOOST_CHECK(cat_s<char>(dst, _countof(dst), src) == 0);BOOST_CHECK(string(dst) == result); }
-    {
-        char dst[] = {0}; const char src[] = {0};
-        string result = string(dst)+src;BOOST_CHECK(cat_s<char>(dst, _countof(dst), src) == 0);BOOST_CHECK(string(dst) == result); }
-    {
-        char dst[] = {1,0,0}; const char src[] = {10,0};
-        string result = string(dst)+src;BOOST_CHECK(cat_s<char>(dst, _countof(dst), src) == 0);BOOST_CHECK(string(dst) == result); }
-    {
-        char dst[] = {0,0,0,0,0}; const char src[] = {10,10,15,15,0};
-        string result = string(dst)+src;BOOST_CHECK(cat_s<char>(dst, _countof(dst), src) == 0);BOOST_CHECK(string(dst) == result); }
-    {
-        char dst[] = {0,1,2,3,4,5}; const char src[] = {10,10,0};
-        string result = string(dst)+src;BOOST_CHECK(cat_s<char>(dst, _countof(dst), src) == 0);BOOST_CHECK(string(dst) == result); }
-
-
-
-
-
-    {
-        double dst[] = {0,1,2,3,4,5}; const double src[] = {10,10,0};
-        std::basic_string<double> result = std::basic_string<double>(dst)+src;BOOST_CHECK(cat_s<double>(dst, _countof(dst), src) == 0);BOOST_CHECK(std::basic_string<double>(dst) == result); }
-    {
-        double dst[] = {1,1,0,3,4,5}; const double src[] = {10,10,0};
-        std::basic_string<double> result = std::basic_string<double>(dst)+src;BOOST_CHECK(cat_s<double>(dst, _countof(dst), src) == 0);BOOST_CHECK(std::basic_string<double>(dst) == result); }
-    {
-        double dst[] = {0,1,2,0,4,5}; const double src[] = {10,0};
-        std::basic_string<double> result = std::basic_string<double>(dst)+src;BOOST_CHECK(cat_s<double>(dst, _countof(dst), src) == 0);BOOST_CHECK(std::basic_string<double>(dst) == result); }
-    {
-        double dst[] = {1,1,2,3,4,0}; const double src[] = {0};
-        std::basic_string<double> result = std::basic_string<double>(dst)+src;BOOST_CHECK(cat_s<double>(dst, _countof(dst), src) == 0);BOOST_CHECK(std::basic_string<double>(dst) == result); }
-    {
-        double dst[] = {0,1,2,3,0,5}; const double src[] = {10, 0};
-        std::basic_string<double> result = std::basic_string<double>(dst)+src;BOOST_CHECK(cat_s<double>(dst, _countof(dst), src) == 0);BOOST_CHECK(std::basic_string<double>(dst) == result); }
-    {
-        double dst[] = {0}; const double src[] = {0};
-        std::basic_string<double> result = std::basic_string<double>(dst)+src;BOOST_CHECK(cat_s<double>(dst, _countof(dst), src) == 0);BOOST_CHECK(std::basic_string<double>(dst) == result); }
-    {
-        double dst[] = {1,0,0}; const double src[] = {10,0};
-        std::basic_string<double> result = std::basic_string<double>(dst)+src;BOOST_CHECK(cat_s<double>(dst, _countof(dst), src) == 0);BOOST_CHECK(std::basic_string<double>(dst) == result); }
-    {
-        double dst[] = {0,0,0,0,0}; const double src[] = {10,10,15,15,0};
-        std::basic_string<double> result = std::basic_string<double>(dst)+src;BOOST_CHECK(cat_s<double>(dst, _countof(dst), src) == 0);BOOST_CHECK(std::basic_string<double>(dst) == result); }
-    {
-        double dst[] = {0,1,2,3,4,5}; const double src[] = {10,10,0};
-        std::basic_string<double> result = std::basic_string<double>(dst)+src;BOOST_CHECK(cat_s<double>(dst, _countof(dst), src) == 0);BOOST_CHECK(std::basic_string<double>(dst) == result); }
-
-}
-
-BOOST_AUTO_TEST_CASE(cpy_saaaa) {
-    const char src1[1] = "";
-    const int isrc1[1] = {0};
-    const char src2[2] = "f";
-    const int isrc2[2] = {60, 0};
-    const char src10[10] = "abcdefghi";
-    const int isrc10[10] = {60, 61, 62, 63, 64, 65, 66, 67, 68, 0};
-    typedef std::basic_string<int> istring;
-    using std::string;
-
-    {
-        DEFINE_BUFFERS;
-        BOOST_CHECK(cpy_s<char>(0, 5/*any*/, 0/*any*/)      == EINVAL);
-        BOOST_CHECK(cpy_s<int>(0, 5/*any*/, 0/*any*/)       == EINVAL);
-        BOOST_CHECK(cpy_s<char>(0, 0/*any*/, src1 /*any*/)  == EINVAL);
-        BOOST_CHECK(cpy_s<int>(0, 0/*any*/, isrc1/*any*/)   == EINVAL);
-        BOOST_CHECK(cpy_s<char>(buf1/*any*/, 5/*any*/,  0)  == EINVAL);
-        BOOST_CHECK(cpy_s<int>(ibuf2/*any*/, 5/*any*/,  0)  == EINVAL);
-        BOOST_CHECK(cpy_s<char>(buf10/*any*/, 0/*any*/, 0)  == EINVAL);
-        BOOST_CHECK(cpy_s<int>(ibuf10/*any*/, 0/*any*/, 0)  == EINVAL);
-    }
-    {
-        DEFINE_BUFFERS;
-
-        BOOST_CHECK(cpy_s<char>(buf1, 0, src1)   == ERANGE);
-        BOOST_CHECK(cpy_s<int>(ibuf1, 0, isrc1)  == ERANGE);
-        BOOST_CHECK(cpy_s<char>(buf1, 1, src10)  == ERANGE);
-        BOOST_CHECK(cpy_s<int>(ibuf1, 1, isrc10) == ERANGE);
-        BOOST_CHECK(cpy_s<char>(buf2, 2, src10)  == ERANGE);
-        BOOST_CHECK(cpy_s<int>(ibuf2, 2, isrc10) == ERANGE);
-    }
-    {
-        DEFINE_BUFFERS;
-
-        BOOST_CHECK(cpy_s<char>(buf2, 2, src2) == 0);
-        BOOST_CHECK(string(buf2) == string(src2));
-        BOOST_CHECK(cpy_s<int>(ibuf2, 2, isrc2) == 0);
-        BOOST_CHECK(istring(ibuf2) == istring(isrc2));
-
-        BOOST_CHECK(cpy_s<char>(buf2, 2, src1) == 0);
-        BOOST_CHECK(string(buf2) == string(src1));
-        BOOST_CHECK(cpy_s<int>(ibuf2, 2, isrc1) == 0);
-        BOOST_CHECK(istring(ibuf2) == istring(isrc1));
-
-        BOOST_CHECK(cpy_s<char>(buf1, 1, src1) == 0);
-        BOOST_CHECK(string(buf1) == string(src1));
-        BOOST_CHECK(cpy_s<int>(ibuf1, 1, isrc1) == 0);
-        BOOST_CHECK(istring(ibuf1) == istring(isrc1));
-
-        BOOST_CHECK(cpy_s<char>(buf10, 10, src10) == 0);
-        BOOST_CHECK(string(buf10) == string(src10));
-        BOOST_CHECK(cpy_s<int>(ibuf10, 10, isrc10) == 0);
-        BOOST_CHECK(istring(ibuf10) == istring(isrc10));
-
-        BOOST_CHECK(cpy_s<char>(buf10, 10, src2) == 0);
-        BOOST_CHECK(string(buf10) == string(src2));
-        BOOST_CHECK(cpy_s<int>(ibuf10, 10, isrc2) == 0);
-        BOOST_CHECK(istring(ibuf10) == istring(isrc2));
     }
 }
