mirror of
https://github.com/taglib/taglib.git
synced 2025-07-22 15:04:24 -04:00
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_SUITE_END();
|
||||
@ -215,6 +216,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