~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to src/plugins/projectexplorer/gnumakeparser.cpp

  • Committer: Timo Jyrinki
  • Date: 2013-11-15 12:25:23 UTC
  • mfrom: (1.1.28)
  • Revision ID: timo.jyrinki@canonical.com-20131115122523-i2kyamsu4gs2mu1m
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include "projectexplorerconstants.h"
33
33
#include "task.h"
34
34
 
 
35
#include <utils/qtcassert.h>
 
36
 
35
37
#include <QDir>
36
38
#include <QFile>
37
39
 
50
52
    m_makeDir.setPattern(QLatin1String(MAKE_PATTERN) +
51
53
                         QLatin1String("(\\w+) directory .(.+).$"));
52
54
    m_makeDir.setMinimal(true);
 
55
    QTC_CHECK(m_makeDir.isValid());
53
56
    m_makeLine.setPattern(QLatin1String(MAKE_PATTERN) + QLatin1String("(\\*\\*\\*\\s)?(.*)$"));
54
57
    m_makeLine.setMinimal(true);
 
58
    QTC_CHECK(m_makeLine.isValid());
55
59
    m_makefileError.setPattern(QLatin1String("^(.*):(\\d+):\\s\\*\\*\\*\\s(.*)$"));
56
60
    m_makefileError.setMinimal(true);
 
61
    QTC_CHECK(m_makefileError.isValid());
57
62
}
58
63
 
59
64
void GnuMakeParser::setWorkingDirectory(const QString &workingDirectory)
333
338
            << QStringList();
334
339
    QTest::newRow("pass-trough note")
335
340
            << QStringList()
336
 
            << QString::fromLatin1("/home/dev/creator/share/qtcreator/dumper/dumper.cpp:1079: note: initialized from here")
 
341
            << QString::fromLatin1("/home/dev/creator/share/qtcreator/debugger/dumper.cpp:1079: note: initialized from here")
337
342
            << OutputParserTester::STDERR
338
 
            << QString() << QString::fromLatin1("/home/dev/creator/share/qtcreator/dumper/dumper.cpp:1079: note: initialized from here\n")
 
343
            << QString() << QString::fromLatin1("/home/dev/creator/share/qtcreator/debugger/dumper.cpp:1079: note: initialized from here\n")
339
344
            << QList<ProjectExplorer::Task>()
340
345
            << QString()
341
346
            << QStringList();
424
429
                    QLatin1String("no filename, no mangling"),
425
430
                    Utils::FileName(),
426
431
                    -1,
427
 
                    Core::Id(Constants::TASK_CATEGORY_COMPILE))
 
432
                    Constants::TASK_CATEGORY_COMPILE)
428
433
            << Task(Task::Error,
429
434
                    QLatin1String("no filename, no mangling"),
430
435
                    Utils::FileName(),
431
436
                    -1,
432
 
                    Core::Id(Constants::TASK_CATEGORY_COMPILE));
 
437
                    Constants::TASK_CATEGORY_COMPILE);
433
438
   QTest::newRow("no mangling")
434
439
            << QStringList()
435
440
            << QStringList()
437
442
                    QLatin1String("unknown filename, no mangling"),
438
443
                    Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")),
439
444
                    -1,
440
 
                    Core::Id(Constants::TASK_CATEGORY_COMPILE))
 
445
                    Constants::TASK_CATEGORY_COMPILE)
441
446
            << Task(Task::Error,
442
447
                    QLatin1String("unknown filename, no mangling"),
443
448
                    Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")),
444
449
                    -1,
445
 
                    Core::Id(Constants::TASK_CATEGORY_COMPILE));
 
450
                    Constants::TASK_CATEGORY_COMPILE);
446
451
    QTest::newRow("find file")
447
452
            << (QStringList(QLatin1String("test/file.cpp")))
448
453
            << (QStringList(QLatin1String("test")))
450
455
                    QLatin1String("mangling"),
451
456
                    Utils::FileName::fromUserInput(QLatin1String("file.cpp")),
452
457
                    10,
453
 
                    Core::Id(Constants::TASK_CATEGORY_COMPILE))
 
458
                    Constants::TASK_CATEGORY_COMPILE)
454
459
            << Task(Task::Error,
455
460
                    QLatin1String("mangling"),
456
461
                    Utils::FileName::fromUserInput(QLatin1String("$TMPDIR/test/file.cpp")),
457
462
                    10,
458
 
                    Core::Id(Constants::TASK_CATEGORY_COMPILE));
 
463
                    Constants::TASK_CATEGORY_COMPILE);
459
464
}
460
465
 
461
466
void ProjectExplorerPlugin::testGnuMakeParserTaskMangling()