~ubuntu-branches/ubuntu/quantal/kdevplatform/quantal-proposed

« back to all changes in this revision

Viewing changes to plugins/grepview/tests/findreplacetest.h

  • Committer: Bazaar Package Importer
  • Author(s): Bhargav Mangipudi
  • Date: 2010-12-16 19:31:23 UTC
  • mfrom: (0.3.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20101216193123-xe2keh5754zwsn1t
Tags: 1.1.80-0ubuntu1
* New upstream release
  - kdevplatform2-libs is now kdevplatform3-libs due to ABI changes
  - Update kdevplatform3-libs.install to include l10n files
  - Update kdevplatform-dev.install
* Removed localization packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
*   Copyright 1999-2001 Bernd Gehrmann and the KDevelop Team              *
 
3
*   bernd@kdevelop.org                                                    *
 
4
*   Copyright 2010 Julien Desgats <julien.desgats@gmail.com>              *
 
5
*                                                                         *
 
6
*   This program is free software; you can redistribute it and/or modify  *
 
7
*   it under the terms of the GNU General Public License as published by  *
 
8
*   the Free Software Foundation; either version 2 of the License, or     *
 
9
*   (at your option) any later version.                                   *
 
10
*                                                                         *
 
11
***************************************************************************/
 
12
 
 
13
 
 
14
#ifndef REPLACETEST_H
 
15
#define REPLACETEST_H
 
16
 
 
17
#include <QtCore/QObject>
 
18
#include <QList>
 
19
#include <QMetaType>
 
20
#include <QPair>
 
21
 
 
22
namespace KDevelop
 
23
{
 
24
    class TestCore;
 
25
}
 
26
class GrepViewPlugin;
 
27
 
 
28
class FindReplaceTest : public QObject
 
29
{
 
30
    Q_OBJECT
 
31
public:
 
32
    struct Match {
 
33
        Match() {}
 
34
        Match(int l,int s,int e) : line(l), start(s), end(e) {}
 
35
        int line;
 
36
        int start;
 
37
        int end;
 
38
    };
 
39
    typedef QList<Match> MatchList;
 
40
    
 
41
    typedef QPair<QString, QString> File;  /// Represent a file with name => content
 
42
    typedef QList<File> FileList;
 
43
    
 
44
private:
 
45
    KDevelop::TestCore* m_testCore;
 
46
    GrepViewPlugin* m_plugin;
 
47
    
 
48
private slots:
 
49
    void initTestCase();
 
50
    
 
51
    void testFind();
 
52
    void testFind_data();
 
53
    
 
54
    void testReplace();
 
55
    void testReplace_data();
 
56
    
 
57
    void cleanupTestCase();
 
58
};
 
59
 
 
60
Q_DECLARE_METATYPE(FindReplaceTest::MatchList)
 
61
Q_DECLARE_METATYPE(FindReplaceTest::FileList);
 
62
 
 
63
#endif // REPLACETEST_H