Skip to content

Commit

Permalink
Move tests, examples
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuald committed Dec 27, 2019
1 parent da9a33c commit 4852611
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/python
#!/usr/bin/env python
import pprint
import sys

sys.path = ["../"] + sys.path
import CppHeaderParser
from CppHeaderParser import CppHeader, CppParseError

try:
cppHeader = CppHeaderParser.CppHeader("SampleClass.h")
except CppHeaderParser.CppParseError as e:
cppHeader = CppHeader("SampleClass.h")
except CppParseError as e:
print(e)
sys.exit(1)

Expand All @@ -19,7 +20,8 @@
0
] # get meth3
meth3ParamTypes = [t["type"] for t in meth3["parameters"]] # get meth3s parameters
print("Parameter Types for public method meth3 %s" % (meth3ParamTypes))
print("Parameter Types for public method meth3")
pprint.pprint(meth3ParamTypes)

print("\nReturn type for meth1:")
print(cppHeader.classes["SampleClass"]["methods"]["public"][1]["rtnType"])
Expand All @@ -28,7 +30,7 @@
print(cppHeader.classes["SampleClass"]["methods"]["public"][2]["doxygen"])

print("\nParameters for meth3:")
print(cppHeader.classes["SampleClass"]["methods"]["public"][3]["parameters"])
pprint.pprint(cppHeader.classes["SampleClass"]["methods"]["public"][3]["parameters"])

print("\nDoxygen for meth4:")
print(cppHeader.classes["SampleClass"]["methods"]["public"][4]["doxygen"])
Expand Down
2 changes: 1 addition & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh -e

cd CppHeaderParser/test/
cd test/
python test_CppHeaderParser.py
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4852611

Please sign in to comment.