Opened 7 years ago

Closed 7 years ago

#14048 closed bug (fixed)

String unit tests

Reported by: korli Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Support Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Several issues in BString unit tests:

  1. Use CPPUNIT_ASSERT_EQUAL
    > +void
    > +StringSplitTest::PerformTest(void)
    > +{
    > + BString *str1;
    > +
    > + NextSubTest();
    > + BStringList stringList1;
    > + str1 = new BString("test::string");
    > + str1->Split(":", true, stringList1);
    > + CPPUNIT_ASSERT(stringList1.CountStrings() == 2);
    > + delete str1;
    
    It would provide better logs in case of error (expected and found values).
    
  1. fix their coding style
  2. fix the failure for "BString::Search" test "i != 0"

Change History (1)

comment:1 by korli, 7 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev51875. Thanks krish_iyer!

Note: See TracTickets for help on using tickets.