File: cctest.cpp

package info (click to toggle)
codelite 10.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 71,364 kB
  • sloc: cpp: 415,397; ansic: 18,277; php: 9,547; lex: 4,181; yacc: 2,820; python: 2,294; sh: 383; makefile: 51; xml: 13
file content (496 lines) | stat: -rw-r--r-- 18,068 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496

#define USE_CLI_EVENTS 1

#include <wx/init.h>   //wxInitializer
#include <wx/string.h> //wxString
#include "tester.h"
#include <wx/ffile.h>
#include <wx/event.h>
#include <memory>
#include <vector>
#include <cpptoken.h>
#include <refactorengine.h>
#include <cppwordscanner.h>
#include <stringsearcher.h>
#include <parse_thread.h>
#include <wx/tokenzr.h>
#include <algorithm>

// CodeLite includes
#include <ctags_manager.h>
#include <CxxVariableScanner.h>
#include <wx/crt.h>

#define WX_STRING_MEMBERS_COUNT 446
#define CLASS_WITH_MEMBERS_COUNT 31

wxString LoadFile(const wxString& filename)
{
    wxFFile f(filename.c_str(), wxT("r"));
    if(f.IsOpened()) {
        wxString content;
        f.ReadAll(&content);
        return content;
    }
    return wxEmptyString;
}

class EventHandler : public wxEvtHandler
{
public:
    void OnParsingDone(wxCommandEvent& e);
    void OnParsingDoneProg(wxCommandEvent& e);
    DECLARE_EVENT_TABLE();
};

BEGIN_EVENT_TABLE(EventHandler, wxEvtHandler)
EVT_COMMAND(wxID_ANY, wxEVT_PARSE_THREAD_RETAGGING_PROGRESS, EventHandler::OnParsingDoneProg)
EVT_COMMAND(wxID_ANY, wxEVT_PARSE_THREAD_RETAGGING_PROGRESS, EventHandler::OnParsingDone)
END_EVENT_TABLE()

void EventHandler::OnParsingDone(wxCommandEvent& e) { wxPrintf(wxT("Parsing completed\n")); }

void EventHandler::OnParsingDoneProg(wxCommandEvent& e) { wxPrintf(wxT("[%%%d] completed\n"), e.GetInt()); }

/////////////////////////////////////////////////////////////////////////////
// Code Completion test cases
/////////////////////////////////////////////////////////////////////////////

TEST_FUNC(testMacros)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/simple_tests.h")), 1, wxT("wxTheClipboard->"),
        LoadFile(wxT("../tests/simple_tests.h")), tags);
    CHECK_SIZE(tags.size(), 66);

    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/simple_tests.h")), 1, wxT("wxTheApp->"),
        LoadFile(wxT("../tests/simple_tests.h")), tags);
    CHECK_SIZE(tags.size(), 319);
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/simple_tests.h")), 1, wxT("EG(name)."),
        LoadFile(wxT("../tests/simple_tests.h")), tags);
    CHECK_SIZE(tags.size(), 157);
    return true;
}

TEST_FUNC(testUsingNamespace)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/using_namespace.h")), 3, wxT("v.at(0)."),
        LoadFile(wxT("../tests/using_namespace.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

// TEST_FUNC(testInnerClassInheritance)
//{
//	std::vector<TagEntryPtr> tags;
//	TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/inner_class_inheritance.h")), 3,
// wxT("td->"), LoadFile(wxT("../tests/inner_class_inheritance.h")), tags);
//	CHECK_SIZE(tags.size(), 97);
//	return true;
//}

TEST_FUNC(testTypedefs)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/typedef_tests.h")), 0, wxT("myStack.at(0)."),
        LoadFile(wxT("../tests/typedef_tests.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testStlMapLeditor)
{
    // test map template with basic types
    // std::map<wxString, int> mm;
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/stl_map_static.h")), 2,
        wxT("ms_bookmarkShapes.find(0)->second."), LoadFile(wxT("../tests/stl_map_static.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);

    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/stl_map_static.h")), 2,
        wxT("ms_bookmarkShapes.find(wxT(\"value\"))->second."), LoadFile(wxT("../tests/stl_map_static.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);

    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/stl_map_static.h")), 2,
        wxT("ms_bookmarkShapes.find(wxT(\"value\"))->first."), LoadFile(wxT("../tests/stl_map_static.h")), tags);
    CHECK_SIZE(tags.size(), 0);

    return true;
}

TEST_FUNC(testMapWithBasicTypes)
{
    // test map template with basic types
    // std::map<wxString, int> mm;
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/simple_tests.h")), 2,
        wxT("mm.find()->first."), LoadFile(wxT("../tests/simple_tests.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);

    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/simple_tests.h")), 2,
        wxT("mm.find()->second."), LoadFile(wxT("../tests/simple_tests.h")), tags);
    CHECK_SIZE(tags.size(), 0);
    return true;
}

TEST_FUNC(testTtp)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/smart_ptr_of_template.h")), 3,
        wxT("ttp->GetRoot()->GetData()."), LoadFile(wxT("../tests/smart_ptr_of_template.h")), tags);
    CHECK_SIZE(tags.size(), 101);

    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/smart_ptr_of_template.h")), 3,
        wxT("ttp->GetRoot()->GetKey()."), LoadFile(wxT("../tests/smart_ptr_of_template.h")), tags);
    CHECK_SIZE(tags.size(), 446);
    return true;
}

TEST_FUNC(testTempalteInheritance)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/simple_tests.h")), 2,
        wxT("ContextManager::Get()->"), LoadFile(wxT("../tests/simple_tests.h")), tags);
    CHECK_SIZE(tags.size(), 7);
    return true;
}

TEST_FUNC(testThis)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(
        wxFileName(wxT("../tests/this_ptr.h")), 4, wxT("this->"), LoadFile(wxT("../tests/this_ptr.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testStdVectorOfTagEntryPtr)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/std_vec_tag_entry_ptr.h")), 3,
        wxT("tags.at(0)->"), LoadFile(wxT("../tests/std_vec_tag_entry_ptr.h")), tags);
    CHECK_SIZE(tags.size(), 101);

    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/std_vec_tag_entry_ptr.h")), 3,
        wxT("tags.at(0)."), LoadFile(wxT("../tests/std_vec_tag_entry_ptr.h")), tags);
    CHECK_SIZE(tags.size(), 10);
    return true;
}

TEST_FUNC(testIterators)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/iterators.h")), 3, wxT("mapIter->first."),
        LoadFile(wxT("../tests/iterators.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);

    tags.clear();
    TagsManagerST::Get()->AutoCompleteCandidates(
        wxFileName(wxT("../tests/iterators.h")), 3, wxT("vecIter->"), LoadFile(wxT("../tests/iterators.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testTemplateTypedef)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/test_template_typedef.h")), 11,
        wxT("Foo_t::Get()->"), LoadFile(wxT("../tests/test_template_typedef.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testNamespace)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/test_namespace.h")), 1, wxT("flex::"),
        LoadFile(wxT("../tests/test_namespace.h")), tags);
    CHECK_SIZE(tags.size(), 32);
    return true;
}

TEST_FUNC(testLocalArgument)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/test_local_var.h")), 2, wxT("path."),
        LoadFile(wxT("../tests/test_local_var.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testBoostForeach)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(
        wxFileName(wxT("../tests/boost_foreach.h")), 3, wxT("str."), LoadFile(wxT("../tests/boost_foreach.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testStdAutoPtr)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(
        wxFileName(wxT("../tests/test_auto_ptr.h")), 4, wxT("p->"), LoadFile(wxT("../tests/test_auto_ptr.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testVectorOfStdString_OperatorMeruba)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/test_vector_std_string.h")), 6, wxT("v[0]->"),
        LoadFile(wxT("../tests/test_vector_std_string.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testWxOrderedMap)
{
    TagEntryPtrVector_t tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/test_wx_ordered_map.h")), 2,
        wxT("om.begin()->first"), LoadFile(wxT("../tests/test_wx_ordered_map.h")), tags);
    CHECK_SIZE(tags.size(), WX_STRING_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testWxArrayString_OperatorMeruba)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/test_wxarraystr.h")), 7, wxT("myArr[]."),
        LoadFile(wxT("../tests/test_wxarraystr.h")), tags);
    CHECK_SIZE(tags.size(), WX_STRING_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testStdSharedPtr)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/test_shared_ptr.h")), 10, wxT("p->"),
        LoadFile(wxT("../tests/test_shared_ptr.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testVectorOfStdString)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/test_vector_std_string.h")), 6,
        wxT("v.at(0)->"), LoadFile(wxT("../tests/test_vector_std_string.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testGotoDeclInsideNamespace)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->FindImplDecl(wxFileName(wxT("../tests/test_goto_decl_inside_ns.h")), 11, wxT("Tada"),
        wxT("Tada"), LoadFile(wxT("../tests/test_goto_decl_inside_ns.h")), tags);

    CHECK_SIZE(tags.size(), 1);
    CHECK_STRING(tags.at(0)->GetName().mb_str(wxConvUTF8).data(), "Tada");
    return true;
}

TEST_FUNC(testGotoDeclOfFuncArgUsingTheMethodScope)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->FindImplDecl(wxFileName(wxT("../tests/test_goto_decl_of_func_arg.h")), 13, wxT("Tada"),
        wxT("Tada"), LoadFile(wxT("../tests/test_goto_decl_of_func_arg.h")), tags);

    CHECK_SIZE(tags.size(), 1);
    CHECK_STRING(tags.at(0)->GetName().mb_str(wxConvUTF8).data(), "Tada");
    return true;
}

TEST_FUNC(testScopeResolving1)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/test_scope_resolving_1.h")), 4, wxT("cls."),
        LoadFile(wxT("../tests/test_scope_resolving_1.h")), tags);
    CHECK_SIZE(tags.size(), 1);
    return true;
}

TEST_FUNC(testTypedefIteratorInsideClass)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/test_typedef_iterator_inside_class.h")), 2,
        wxT("__iter->second->"), LoadFile(wxT("../tests/test_typedef_iterator_inside_class.h")), tags);
    CHECK_SIZE(tags.size(), 31);
    return true;
}

TEST_FUNC(testStrcutDelcratorInFuncArgument)
{
    std::vector<TagEntryPtr> tags;
    wxString codeliteHome;
    wxGetEnv(wxT("CL_HOME"), &codeliteHome);
    wxString headerFile;
    headerFile << codeliteHome << wxT("/SampleWorkspace/header.h");
    wxFileName fn(headerFile);
    fn.MakeAbsolute();
    headerFile = fn.GetFullPath();
    TagsManagerST::Get()->AutoCompleteCandidates(headerFile, 77, wxT("s->"), wxEmptyString, tags);
    CHECK_SIZE(tags.size(), WX_STRING_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testAutoSimple)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/test_auto_simple.h")), 2,
        wxT("autoPtr->second->"), LoadFile(wxT("../tests/test_auto_simple.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testBoostSharedPtr)
{
    std::vector<TagEntryPtr> tags;
    TagsManagerST::Get()->AutoCompleteCandidates(wxFileName(wxT("../tests/boost_shared_ptr.h")), 2, wxT("s->"),
        LoadFile(wxT("../tests/boost_shared_ptr.h")), tags);
    CHECK_SIZE(tags.size(), CLASS_WITH_MEMBERS_COUNT);
    return true;
}

TEST_FUNC(testVariablesParserSimple)
{
    wxString content = LoadFile("../tests/test_parse_variables_simple.h");
    CxxVariableScanner scanner(content);
    CxxVariable::Map_t vars = scanner.GetVariablesMap();
    CHECK_SIZE(vars.size(), 1); // a,b,c,d,e,f,g,str,stringMap,nNumber
    CHECK_CONDITION(vars.count("delims"), "variable 'delims' was not found");
    return true;
}

TEST_FUNC(testVariablesParserCxx11)
{
    wxString content = LoadFile("../tests/test_parse_variables_cxx11.h");
    CxxVariableScanner scanner(content);
    CxxVariable::Map_t vars = scanner.GetVariablesMap();
    CHECK_SIZE(vars.size(), 4);
    CHECK_CONDITION(vars.count("var1"), "variable 'var1' was not found");
    CHECK_CONDITION(vars.count("var2"), "variable 'var2' was not found");
    CHECK_CONDITION(vars.count("arg1"), "variable 'arg1' was not found");
    CHECK_CONDITION(vars.count("arg2"), "variable 'arg2' was not found");
    return true;
}

TEST_FUNC(testVariablesParserClassMembers)
{
    wxString content = LoadFile("../tests/test_parse_variables_class_members.h");
    CxxVariableScanner scanner(content);
    CxxVariable::Map_t vars = scanner.GetVariablesMap();
    CHECK_SIZE(vars.size(), 2);
    return true;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////

void testCC()
{
    // Load the tags database that is used during the test.
    wxFileName fn(wxT("../../SampleWorkspace/.codelite/SampleWorkspace.tags"));
    TagsManagerST::Get()->OpenDatabase(fn);

    TagsOptionsData tod;
    TagsManagerST::Get()->SetCtagsOptions(tod);
    TagsManagerST::Get()->GetDatabase()->SetSingleSearchLimit(
        5000); // For the testing to pass we need to set a huge number of matches
    // Execute the tests
    Tester::Instance()->RunTests();

    Tester::Release();
    TagsManagerST::Free();
    LanguageST::Free();
}

void testStringSearcher()
{
#if 0
    int      pos(0);
    int      match_len(0);
    wxString m_word  = wxT("clMainFrame");
    size_t   offset = 0;
    wxString m_str = LoadFile(wxT("/home/eran/devl/codelite/LiteEditor/frame.cpp"));

    const wchar_t* pin   = m_str.c_str().AsWChar();
    const wchar_t* pword = m_word.c_str().AsWChar();
    while ( StringFindReplacer::Search(pin, offset, pword, wxSD_MATCHCASE | wxSD_MATCHWHOLEWORD, pos, match_len) ) {
        // add result
        std::pair<int, int> match;
        match.first = pos;
        match.second = match_len;

        offset = pos + match_len;
    }
#endif
}

void testRetagWorkspace()
{
    // load the workspace file list
    wxArrayString inclPath;
    wxArrayString exclPath;
    std::vector<wxFileName> files;

    wxFileName fn(wxT("../workspace_file.list"));
    wxString content = LoadFile(fn.GetFullPath());

    wxArrayString lines = wxStringTokenize(content, wxT("\n"), wxTOKEN_STRTOK);
    for(size_t i = 0; i < lines.GetCount(); i++) {
        wxString fname = lines.Item(i).Trim().Trim(false);
        if(fname.IsEmpty()) continue;
        files.push_back(lines.Item(i));
    }

    inclPath.Add(wxT("/usr/include/c++/4.4"));
    inclPath.Add(wxT("/usr/include/c++/4.4/x86_64-linux-gnu"));
    inclPath.Add(wxT("/usr/include/c++/4.4/backward"));
    inclPath.Add(wxT("/usr/local/include"));
    inclPath.Add(wxT("/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include"));
    inclPath.Add(wxT("/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include-fixed"));
    inclPath.Add(wxT("/usr/include"));
    inclPath.Add(wxT("/usr/include/qt4/QtCore"));
    inclPath.Add(wxT("/usr/include/qt4/QtGui"));
    inclPath.Add(wxT("/usr/include/qt4/QtXml"));
    inclPath.Add(wxT("/home/eran/wx29/include/wx-2.9"));

    // Set the search paths and start the parser thread
    ParseThreadST::Get()->SetSearchPaths(inclPath, exclPath);
    ParseThreadST::Get()->SetNotifyWindow(NULL);

    ParseThreadST::Get()->Start();

    // Perform a full retagging
    TagsManagerST::Get()->SetCodeLiteIndexerPath(wxT("/usr/bin"));
    TagsManagerST::Get()->StartCodeLiteIndexer();
    TagsManagerST::Get()->OpenDatabase(wxFileName(wxT("test.tags")));
    TagsManagerST::Get()->RetagFiles(files, TagsManager::Retag_Full);

    char line[100];
    gets(line);

    ParseThreadST::Get()->Stop();
    ParseThreadST::Free();
    TagsManagerST::Free();
    LanguageST::Free();
}

/**
 * @brief call the test framework
 */
int main(int argc, char** argv)
{
    // Initialize the wxWidgets library
    wxInitializer initializer;
    // testRetagWorkspace();
    // testStringSearcher();
    testCC();
    return 0;
}