diff options
Diffstat (limited to 'bindings/python/tests/cindex/test_cursor.py')
-rw-r--r-- | bindings/python/tests/cindex/test_cursor.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bindings/python/tests/cindex/test_cursor.py b/bindings/python/tests/cindex/test_cursor.py index 51695e2..edb209b 100644 --- a/bindings/python/tests/cindex/test_cursor.py +++ b/bindings/python/tests/cindex/test_cursor.py @@ -241,3 +241,12 @@ def test_get_tokens(): assert len(tokens) == 7 assert tokens[0].spelling == 'int' assert tokens[1].spelling == 'foo' + +def test_get_arguments(): + tu = get_tu('void foo(int i, int j);') + foo = get_cursor(tu, 'foo') + arguments = list(foo.get_arguments()) + + assert len(arguments) == 2 + assert arguments[0].spelling == "i" + assert arguments[1].spelling == "j" |