[haiku-commits] haiku: hrev51387 - src/tests/kits/locale

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 30 Aug 2017 20:20:01 +0200 (CEST)

hrev51387 adds 2 changesets to branch 'master'
old head: 8fe6df22f8c92e08fbddbc4573fe0c2871e91079
new head: f2c460497c89894e959df22ee2693ae444fc72ca
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=f2c460497c89+%5E8fe6df22f8c9

----------------------------------------------------------------------------

dadffbdbff8e: BDurationFormatTest: Add test cases for abbreviated format style.
  
  Signed-off-by: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>

f2c460497c89: BDurationFormatTest: Add test cases for abbreviated format style.
  
  Signed-off-by: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>

                       [ Akshay Agarwal <agarwal.akshay.akshay8@xxxxxxxxx> ]

----------------------------------------------------------------------------

1 file changed, 40 insertions(+)
src/tests/kits/locale/DurationFormatTest.cpp | 40 ++++++++++++++++++++++++

############################################################################

Commit:      dadffbdbff8e2fc317f695bd720e8e691c2f16e4
URL:         http://cgit.haiku-os.org/haiku/commit/?id=dadffbdbff8e
Author:      Akshay Agarwal <agarwal.akshay.akshay8@xxxxxxxxx>
Date:        Sat Aug 26 11:16:14 2017 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Wed Aug 30 17:32:48 2017 UTC

BDurationFormatTest: Add test cases for abbreviated format style.

Signed-off-by: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/tests/kits/locale/DurationFormatTest.cpp 
b/src/tests/kits/locale/DurationFormatTest.cpp
index cd17576..6a7c4c1 100644
--- a/src/tests/kits/locale/DurationFormatTest.cpp
+++ b/src/tests/kits/locale/DurationFormatTest.cpp
@@ -90,6 +90,26 @@ DurationFormatTest::TestDuration()
                CPPUNIT_ASSERT_EQUAL(B_OK, result);
                CPPUNIT_ASSERT_EQUAL(expected, buffer);
        }
+
+       {
+               BDurationFormat format(englishLanguage, englishFormat,
+                       ":", B_TIME_UNIT_ABBREVIATED);
+               status_t result = format.Format(buffer, 0, 800000000000ll);
+
+               expected << "1 wk:2 days:6 hr:13 min:20 sec";
+               CPPUNIT_ASSERT_EQUAL(B_OK, result);
+               CPPUNIT_ASSERT_EQUAL(expected, buffer);
+       }
+
+       {
+               BDurationFormat format(frenchLanguage, frenchFormat,
+                       ":", B_TIME_UNIT_ABBREVIATED);
+               result = format.Format(buffer, 0, 800000000000ll);
+
+               expected << "1 sem.:2 j:6 h:13 min:20 s";
+               CPPUNIT_ASSERT_EQUAL(B_OK, result);
+               CPPUNIT_ASSERT_EQUAL(expected, buffer);
+       }
 }
 
 

############################################################################

Revision:    hrev51387
Commit:      f2c460497c89894e959df22ee2693ae444fc72ca
URL:         http://cgit.haiku-os.org/haiku/commit/?id=f2c460497c89
Author:      Akshay Agarwal <agarwal.akshay.akshay8@xxxxxxxxx>
Date:        Sat Aug 26 11:16:14 2017 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Wed Aug 30 18:15:30 2017 UTC

BDurationFormatTest: Add test cases for abbreviated format style.

Signed-off-by: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/tests/kits/locale/DurationFormatTest.cpp 
b/src/tests/kits/locale/DurationFormatTest.cpp
index 6a7c4c1..dc2dc69 100644
--- a/src/tests/kits/locale/DurationFormatTest.cpp
+++ b/src/tests/kits/locale/DurationFormatTest.cpp
@@ -110,6 +110,26 @@ DurationFormatTest::TestDuration()
                CPPUNIT_ASSERT_EQUAL(B_OK, result);
                CPPUNIT_ASSERT_EQUAL(expected, buffer);
        }
+
+       {
+               BDurationFormat format(englishLanguage, englishFormat,
+                       ":", B_TIME_UNIT_ABBREVIATED);
+               status_t result = format.Format(buffer, 0, 800000000000ll);
+
+               expected << "1 wk:2 days:6 hr:13 min:20 sec";
+               CPPUNIT_ASSERT_EQUAL(B_OK, result);
+               CPPUNIT_ASSERT_EQUAL(expected, buffer);
+       }
+
+       {
+               BDurationFormat format(frenchLanguage, frenchFormat,
+                       ":", B_TIME_UNIT_ABBREVIATED);
+               result = format.Format(buffer, 0, 800000000000ll);
+
+               expected << "1 sem.:2 j:6 h:13 min:20 s";
+               CPPUNIT_ASSERT_EQUAL(B_OK, result);
+               CPPUNIT_ASSERT_EQUAL(expected, buffer);
+       }
 }
 
 


Other related posts:

  • » [haiku-commits] haiku: hrev51387 - src/tests/kits/locale - pulkomandy