-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: tests, adding more tests for loading/storing
- Loading branch information
Showing
13 changed files
with
4,104 additions
and
1,252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "cwl_v1_2.h" | ||
|
||
#include <iostream> | ||
|
||
/** | ||
* This test program creates loads and prints a CWL description. | ||
* | ||
* It assumes that printing to stdout works (see cwl_output_example). | ||
* It loads a CWL description from a file and populates C++ classes. | ||
*/ | ||
|
||
|
||
int main(int argc, char** argv) { | ||
if (argc < 2) return 1; | ||
|
||
auto tool = cpp_gen::load_document(argv[1]); | ||
|
||
// parse command line | ||
auto config = cpp_gen::store_config{}; | ||
for (int i{2}; i < argc; ++i) { | ||
auto sv = std::string_view{argv[i]}; | ||
if (sv == "no_simplification") { | ||
config.simplifyTypes = false; | ||
} else if (sv == "no_list_to_map") { | ||
config.transformListsToMaps = false; | ||
} else if (sv == "tags") { | ||
config.generateTags = true; | ||
} | ||
} | ||
cpp_gen::store_document(tool, std::cout, config); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.