Skip to content
Snippets Groups Projects
Commit 749e97db authored by Leandro Melo's avatar Leandro Melo
Browse files

Fixing unit test due to change in the Highlighter's constructor.

parent 6793f1f9
No related branches found
No related tags found
No related merge requests found
...@@ -47,9 +47,8 @@ char *toString(const QTextCharFormat &format) ...@@ -47,9 +47,8 @@ char *toString(const QTextCharFormat &format)
using namespace TextEditor; using namespace TextEditor;
using namespace Internal; using namespace Internal;
HighlighterMock::HighlighterMock(const QSharedPointer<Context> &defaultContext, HighlighterMock::HighlighterMock(QTextDocument *parent) :
QTextDocument *parent) : Highlighter(parent),
Highlighter(defaultContext, parent),
m_debugDetails(false), m_debugDetails(false),
m_statesCounter(0), m_statesCounter(0),
m_formatsCounter(0), m_formatsCounter(0),
......
...@@ -61,8 +61,7 @@ struct HighlightSequence ...@@ -61,8 +61,7 @@ struct HighlightSequence
class HighlighterMock : public TextEditor::Internal::Highlighter class HighlighterMock : public TextEditor::Internal::Highlighter
{ {
public: public:
HighlighterMock(const QSharedPointer<TextEditor::Internal::Context> &defaultContext, HighlighterMock(QTextDocument *parent = 0);
QTextDocument *parent = 0);
void reset(); void reset();
void showDebugDetails(); void showDebugDetails();
......
...@@ -122,7 +122,8 @@ void tst_HighlighterEngine::initTestCase() ...@@ -122,7 +122,8 @@ void tst_HighlighterEngine::initTestCase()
createContexts(); createContexts();
createItemDatas(); createItemDatas();
m_highlighterMock.reset(new HighlighterMock(m_definition->initialContext())); m_highlighterMock.reset(new HighlighterMock());
m_highlighterMock->setDefaultContext(m_definition->initialContext());
m_highlighterMock->setDocument(m_text.document()); m_highlighterMock->setDocument(m_text.document());
m_highlighterMock->configureFormat(Highlighter::Keyword, Formats::instance().keywordFormat()); m_highlighterMock->configureFormat(Highlighter::Keyword, Formats::instance().keywordFormat());
m_highlighterMock->configureFormat(Highlighter::DataType, Formats::instance().dataTypeFormat()); m_highlighterMock->configureFormat(Highlighter::DataType, Formats::instance().dataTypeFormat());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment