~ubuntu-branches/ubuntu/trusty/aria2/trusty

« back to all changes in this revision

Viewing changes to test/UtilTest.cc

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry
  • Date: 2013-12-16 18:41:03 UTC
  • mfrom: (2.5.21 sid)
  • Revision ID: package-import@ubuntu.com-20131216184103-xzah3019zwut429g
Tags: 1.18.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
  CPPUNIT_TEST(testUitos);
65
65
  CPPUNIT_TEST(testNtoh64);
66
66
  CPPUNIT_TEST(testPercentEncode);
 
67
  CPPUNIT_TEST(testPercentEncodeMini);
67
68
  CPPUNIT_TEST(testHtmlEscape);
68
69
  CPPUNIT_TEST(testJoinPath);
69
70
  CPPUNIT_TEST(testParseIndexPath);
132
133
  void testUitos();
133
134
  void testNtoh64();
134
135
  void testPercentEncode();
 
136
  void testPercentEncodeMini();
135
137
  void testHtmlEscape();
136
138
  void testJoinPath();
137
139
  void testParseIndexPath();
1879
1881
  CPPUNIT_ASSERT_EQUAL(std::string("1%5EA%20"), util::percentEncode("1^A "));
1880
1882
}
1881
1883
 
 
1884
void UtilTest::testPercentEncodeMini()
 
1885
{
 
1886
  CPPUNIT_ASSERT_EQUAL(std::string("%80"),
 
1887
                       util::percentEncodeMini({(char)0x80}));
 
1888
}
 
1889
 
1882
1890
void UtilTest::testHtmlEscape()
1883
1891
{
1884
1892
  CPPUNIT_ASSERT_EQUAL(std::string("aria2<>"'util"),