No to be frank, having read the code im not quite sure how to do it properly(some things just don't seem to produce errors).
Georgios Fakidis (4b5fac5a) at 18 Mar 15:40
Tests for validation changed to use existing infra
It worked properly, i am pushing the changes.
Thank you so much, this was completely beyond me
Ok, pushed it, left both variations(the one i had already done) and the TmpDir one, you can take a look at it.
Georgios Fakidis (da7c5130) at 18 Mar 12:38
(Not complete) Added /testfiles in lvtqtw, removed some unnecessary...
"The specified folder does not contain compile_commands.json<-- message of build folder error". Also i checked when not visible it just has "TextLabel" as text
I am using it like this
auto tempDir = TmpDir("parse_codebase_temp");
auto file = tempDir.createTextFile("compile_commands.json", sample_compile_commands_json());
auto folder_has_compile_commands_json = tempDir.path();
parseCodeBaseDialog.setCompileCommandsFolder(QString(folder_has_compile_commands_json.c_str()));
qDebug() << parseCodeBaseDialog.buildFolderError() + "<-- message of build folder error";
The assertions that fail looks like this
REQUIRE(parseCodeBaseDialog.buildFolderError().isEmpty());
REQUIRE(!parseCodeBaseDialog.buildFolderErrorIsVisible());
But it doesn't seem to work properly(the file exists in the folder and the method called by the app verifies this, i also debugged it and the file really is there). Do you have any idea?
i'll remove most of them as they now seem redundant.
I will use the helpers as suggested for less code, and i will do the setup of the infra for future use, it will be needed for more extensive testing.
Probably yes, as it resets things and if there is another parse stage to be done it starts it.
I'll remove that, parsing means running the compilers to see which files are related and in what manner right?
Are you referring to all methods displayed here or a specific one? Those are more like helper methods so im not sure how to meaningfully add cpp::result, but i will give it a try.
Given the source folder, i test that the appropriate messages are shown for each scenario. Currently we show errors for when the user provides a wsl file path, when it is empty, and when it is ok no error(for a folder to be ok, what files should it have? i guess there can't be something specific we can check for).
@tarcisiofischer rebased it to master, now you can now review it and suggest additional changes if necessary
Georgios Fakidis (3eadd691) at 05 Mar 15:43
Finalising the refactor of parse_codebase_dialog
... and 73 more commits
Georgios Fakidis (98a9c92d) at 03 Mar 17:09
Finalising the refactor of parse_codebase_dialog
Georgios Fakidis (e81c7229) at 03 Mar 17:08
Finalising the refactor of parse_codebase_dialog
Georgios Fakidis (8c6537cd) at 03 Mar 17:03
Finalising the refactor of parse_codebase_dialog
Georgios Fakidis (f9d9cd1b) at 29 Feb 09:40
Added tests for validation rules in parse_codebase_dialog