diff options
Diffstat (limited to '')
-rw-r--r-- | test/compile_commands.json | 6 | ||||
-rw-r--r-- | test/main.cpp | 9 | ||||
-rwxr-xr-x | testscript/main.py | 18 |
3 files changed, 28 insertions, 5 deletions
diff --git a/test/compile_commands.json b/test/compile_commands.json index a12a8fc..4f584fd 100644 --- a/test/compile_commands.json +++ b/test/compile_commands.json @@ -1,7 +1,7 @@ [ { - "command": "c++ -c -std=c++11 -fpic -o main.o main.cpp", - "directory": "/home/bloodstalker/devi/abbatoir/hole114", - "file": "/home/bloodstalker/devi/abbatoir/hole114/main.cpp" + "command": "c++ -c -std=c++11 -fpic -o main.o main.cpp", + "directory": "/home/bloodstalker/extra/cgrep/test", + "file": "/home/bloodstalker/extra/cgrep/test/main.cpp" } ]
\ No newline at end of file diff --git a/test/main.cpp b/test/main.cpp index 815a48d..5c2ceb8 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -1,8 +1,8 @@ class myClass { public: - myClass(); - ~myClass(); + myClass() = default; + ~myClass() {} void myMehtod1(void) {} void myMehtod2(void) {} @@ -16,6 +16,11 @@ struct myStruct { ~myStruct(); }; +union myUnion { + int a; + double b; +}; + void myFunc1(void) {} void myFunc2(void) {} diff --git a/testscript/main.py b/testscript/main.py new file mode 100755 index 0000000..4990d10 --- /dev/null +++ b/testscript/main.py @@ -0,0 +1,18 @@ +#!/usr/bin/python3 +# _*_ coding=utf-8 _*_ + +import argparse + +class Argparser(object): + def __init__(self): + parser = argparse.ArgumentParser() + parser.add_argument("--string", type=str, help="string") + parser.add_argument("--bool", action="store_true", help="bool", default=False) + parser.add_argument("--dbg", action="store_true", help="debug", default=False) + self.args = parser.parse_args() + +def main(): + argparser = Argparser() + +if __name__ == "__main__": + main() |