mirror of
https://github.com/taglib/taglib.git
synced 2025-07-20 22:14:22 -04:00
Merge pull request #312 from TsudaKageyu/string-format
Unified the string formatting functions
This commit is contained in:
@ -41,6 +41,7 @@ class TestString : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testAppendCharDetach);
|
||||
CPPUNIT_TEST(testAppendStringDetach);
|
||||
CPPUNIT_TEST(testToInt);
|
||||
CPPUNIT_TEST(testFromInt);
|
||||
CPPUNIT_TEST(testSubstr);
|
||||
CPPUNIT_TEST(testNewline);
|
||||
CPPUNIT_TEST(testUpper);
|
||||
@ -216,6 +217,12 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(String("-123aa").toInt(), -123);
|
||||
}
|
||||
|
||||
void testFromInt()
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL(String("123"), String::number(123));
|
||||
CPPUNIT_ASSERT_EQUAL(String("-123"), String::number(-123));
|
||||
}
|
||||
|
||||
void testSubstr()
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL(String("01"), String("0123456").substr(0, 2));
|
||||
|
Reference in New Issue
Block a user