File: FmtTest.cc

package info (click to toggle)
aria2 1.37.0%2Bdebian-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,128 kB
  • sloc: cpp: 115,006; ansic: 9,140; makefile: 1,466; ruby: 475; python: 373; sh: 260; xml: 176
file content (28 lines) | stat: -rw-r--r-- 528 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "fmt.h"

#include <cppunit/extensions/HelperMacros.h>

namespace aria2 {

class FmtTest : public CppUnit::TestFixture {

  CPPUNIT_TEST_SUITE(FmtTest);
  CPPUNIT_TEST(testFmt);
  CPPUNIT_TEST_SUITE_END();

public:
  void testFmt();
};

CPPUNIT_TEST_SUITE_REGISTRATION(FmtTest);

void FmtTest::testFmt()
{
  int major = 1;
  int minor = 0;
  int release = 7;
  CPPUNIT_ASSERT_EQUAL(std::string("aria2-1.0.7-beta"),
                       fmt("aria2-%d.%d.%d-%s", major, minor, release, "beta"));
}

} // namespace aria2