Changeset 819 in dev for branches


Ignore:
Timestamp:
Mar 20, 2011, 3:37:07 AM (14 years ago)
Author:
イグトランス (egtra)
Message:

Jenga/common/String.cppのテストを少し充実させた。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/egtra/ab5.0/abdev/ab-test/jenga.cpp

    r818 r819  
    88#include "stdafx.h"
    99
    10 #include <locale>
     10#include <boost/assign.hpp>
    1111#include <jenga/include/jenga.h>
    1212
     13using namespace boost::assign;
    1314using namespace Jenga::Common;
    1415
     
    1819BOOST_AUTO_TEST_CASE( JengaCommonString )
    1920{
     21    std::vector<std::string> v;
     22    v += "ABC", "def", "123";
     23
     24    BOOST_CHECK(IsExistString(v, "123"));
     25    BOOST_CHECK(!IsExistString(v, "abc"));
     26
    2027    std::string s = "Dete koi dete koi ike no koi";
    2128    StringReplace(s, "koi", "ike");
    2229    BOOST_CHECK_EQUAL(s, "Dete ike dete ike ike no ike");
     30
    2331    BOOST_CHECK_EQUAL(ToString(42), "42");
    2432    BOOST_CHECK_EQUAL(ToString(-7), "-7");
     33
    2534    BOOST_CHECK_EQUAL(ToString(std::wstring(L"ABC123")), "ABC123");
     35
    2636    BOOST_CHECK(ToWString(std::string("ABC123")) == L"ABC123");
     37
    2738    BOOST_CHECK(IsIdentifierTopChar('a'));
    2839    BOOST_CHECK(IsIdentifierTopChar('z'));
Note: See TracChangeset for help on using the changeset viewer.