summaryrefslogtreecommitdiff
path: root/libs/taglib/tests/test_map.cpp
blob: b6f77aae328cb96846dd49e69125df522d9f55d4 (plain)
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
#include <cppunit/extensions/HelperMacros.h>
#include <tstring.h>
#include <tmap.h>

using namespace std;
using namespace TagLib;

class TestMap : public CppUnit::TestFixture
{
  CPPUNIT_TEST_SUITE(TestMap);
  CPPUNIT_TEST(testInsert);
  CPPUNIT_TEST_SUITE_END();

public:

  void testInsert()
  {
    Map<String, int> m;
    m.insert("foo", 3);
    CPPUNIT_ASSERT_EQUAL(3, m["foo"]);
    m.insert("foo", 7);
    CPPUNIT_ASSERT_EQUAL(7, m["foo"]);
  }

};

CPPUNIT_TEST_SUITE_REGISTRATION(TestMap);