mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 17:11:59 +00:00
add doctest
This commit is contained in:
parent
ada13f2939
commit
2f730efd41
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -4,3 +4,6 @@
|
|||||||
[submodule "third_party/tiny-process-library"]
|
[submodule "third_party/tiny-process-library"]
|
||||||
path = third_party/tiny-process-library
|
path = third_party/tiny-process-library
|
||||||
url = https://github.com/eidheim/tiny-process-library/
|
url = https://github.com/eidheim/tiny-process-library/
|
||||||
|
[submodule "third_party/doctest"]
|
||||||
|
path = third_party/doctest
|
||||||
|
url = https://github.com/onqtam/doctest
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
|
|
||||||
#include "third_party/tiny-process-library/process.hpp"
|
#include "third_party/tiny-process-library/process.hpp"
|
||||||
|
|
||||||
|
#define DOCTEST_CONFIG_IMPLEMENT
|
||||||
|
#include "third_party/doctest/doctest/doctest.h"
|
||||||
|
|
||||||
#include <rapidjson/istreamwrapper.h>
|
#include <rapidjson/istreamwrapper.h>
|
||||||
#include <rapidjson/ostreamwrapper.h>
|
#include <rapidjson/ostreamwrapper.h>
|
||||||
|
|
||||||
@ -1023,6 +1026,10 @@ void PreMain() {
|
|||||||
MessageRegistry::instance()->Register<In_WorkspaceSymbolRequest>();
|
MessageRegistry::instance()->Register<In_WorkspaceSymbolRequest>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("helo") {
|
||||||
|
CHECK(1 == 1);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
bool loop = false;
|
bool loop = false;
|
||||||
while (loop)
|
while (loop)
|
||||||
@ -1035,7 +1042,13 @@ int main(int argc, char** argv) {
|
|||||||
// return 0;
|
// return 0;
|
||||||
//}
|
//}
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
RunTests();
|
doctest::Context context;
|
||||||
|
context.applyCommandLine(argc, argv);
|
||||||
|
int res = context.run();
|
||||||
|
if (context.shouldExit())
|
||||||
|
return res;
|
||||||
|
|
||||||
|
//RunTests();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
third_party/doctest
vendored
Submodule
1
third_party/doctest
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 11147357234d0166c9ec96c4d9e328464b884da3
|
Loading…
Reference in New Issue
Block a user