-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
44 lines (38 loc) · 972 Bytes
/
Copy pathmain.cpp
File metadata and controls
44 lines (38 loc) · 972 Bytes
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
//
// Created by Sammy Timmins on 11/14/20.
//
#define CATCH_CONFIG_RUNNER
#include <iostream>
#include "catch.hpp"
#include "Runner.h"
int runCatchTests(int argc, char* const argv[])
{
return Catch::Session().run(argc, argv);
}
/**
* Each file header will specify who created the file, although some files both team members worked on
* If a file was worked on by both teammates, then the specific function will have their initials in the comment above it
* Otherwise, the creator of the file will be specified on the top
*
* Happy Searching! :)
*/
int main(int argc, char** argv)
{
if(argc == 3)
{
string search = argv[1];
string path = argv[2];
runSearchEngine(search, path);
}
else if(argc == 1)
{
//runs the actual search engine
runSearchEngine();
}
else if(strcmp(argv[1], "-test") == 0)
{
// runs catch tests
return runCatchTests(1, argv);
}
return 0;
}