~ubuntu-branches/debian/stretch/psi-plus/stretch

« back to all changes in this revision

Viewing changes to src/unittest/psiiconset/testpsiiconset.cpp

  • Committer: Package Import Robot
  • Author(s): Boris Pek
  • Date: 2013-10-23 02:42:20 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20131023024220-bk2hyoenqkwfhpgw
Tags: 0.16.242-1
* New upstream release:
  fixed the problem of initialization of private conversation when both
  sides use libotr 4.0.x. (Closes: #724880)
* Update debian/watch: sources were moved.
* Delete psi-plus-content-downloader package and update all related files.
  This plugin is in psi-plus-plugins package now.
* Update debian/control:
  - remove all currently unneeded Replaces and Breaks fields
  - add build dependency on libidn11-dev
* Update debian/rules: simplify get-orig-source section.
* Update debian/copyright:
  - update Source field due to changes in sources location
  - remove copyright holders whose code was deleted from source tree
    (bundled libidn library was removed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
        void initTestCase()
17
17
        {
18
18
                is = new PsiIconset();
19
 
                
 
19
 
20
20
                g.pathBase = "../../tools/iconset/unittest";
21
21
                g.pathHome = getHomeDir();
22
22
                g.pathProfiles = g.pathHome + "/profiles";
33
33
        }
34
34
 
35
35
        // this mustn't produce any valgrind errors, so
36
 
        // it's pretty safe to generate suppressions 
 
36
        // it's pretty safe to generate suppressions
37
37
        // from this test: just run "./testpsiiconset testLoadImage"
38
38
        void testLoadImage()
39
39
        {
40
40
                QImage *img = new QImage(":iconsets/system/default/psimain.png");
41
41
                delete img;
42
42
        }
43
 
                
 
43
 
44
44
        void testLoadAll()
45
45
        {
46
46
                // checking for memory leaks this way
47
47
                for (int i = 0; i < 3; i++)
48
48
                        QVERIFY(is->loadAll());
49
49
        }
50
 
                
 
50
 
51
51
        void testBasePath()
52
52
        {
53
53
                Iconset *iconset = new Iconset();
54
54
                QVERIFY(iconset->load(g.pathBase + "/iconsets/roster/default.jisp"));
55
55
                delete iconset;
56
56
        }
57
 
                
 
57
 
58
58
        void testChangeOptions()
59
59
        {
60
60
                Options oldOptions = option;
61
61
                option.systemIconset = "crystal_system.jisp";
62
62
                option.emoticons = (QStringList() << "puz.jisp");
63
63
                option.defaultRosterIconset = "default.jisp";
64
 
                
 
64
 
65
65
                QVERIFY(is->optionsChanged(&oldOptions));
66
 
                
67
 
                QCOMPARE(is->system().name(),        QString("Crystal (System)"));   
68
 
                QCOMPARE(is->system().description(), QString("Crystal System Iconset"));   
69
 
                QCOMPARE(is->system().version(),     QString("0.3"));   
 
66
 
 
67
                QCOMPARE(is->system().name(),        QString("Crystal (System)"));
 
68
                QCOMPARE(is->system().description(), QString("Crystal System Iconset"));
 
69
                QCOMPARE(is->system().version(),     QString("0.3"));
70
70
                QCOMPARE(is->emoticons.first()->name(), QString("puzazBox"));
71
 
                
 
71
 
72
72
                option = oldOptions;
73
73
        }
74
74
};