r209316 - cindex/test_cursor.py: no need to skip implicit decls in tests
Alp Toker
alp at nuanti.com
Wed May 21 12:17:38 PDT 2014
Author: alp
Date: Wed May 21 14:17:38 2014
New Revision: 209316
URL: http://llvm.org/viewvc/llvm-project?rev=209316&view=rev
Log:
cindex/test_cursor.py: no need to skip implicit decls in tests
clang was fixed some time ago to always skip "builtins and other cruft" so
tools no longer need hacks like this.
Passes nosetests.
Modified:
cfe/trunk/bindings/python/tests/cindex/test_cursor.py
Modified: cfe/trunk/bindings/python/tests/cindex/test_cursor.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/tests/cindex/test_cursor.py?rev=209316&r1=209315&r2=209316&view=diff
==============================================================================
--- cfe/trunk/bindings/python/tests/cindex/test_cursor.py (original)
+++ cfe/trunk/bindings/python/tests/cindex/test_cursor.py Wed May 21 14:17:38 2014
@@ -8,9 +8,6 @@ from .util import get_cursors
from .util import get_tu
kInput = """\
-// FIXME: Find nicer way to drop builtins and other cruft.
-int start_decl;
-
struct s0 {
int a;
int b;
@@ -33,11 +30,7 @@ void f0(int a0, int a1) {
def test_get_children():
tu = get_tu(kInput)
- # Skip until past start_decl.
it = tu.cursor.get_children()
- while it.next().spelling != 'start_decl':
- pass
-
tu_nodes = list(it)
assert len(tu_nodes) == 3
@@ -49,7 +42,7 @@ def test_get_children():
assert tu_nodes[0].spelling == 's0'
assert tu_nodes[0].is_definition() == True
assert tu_nodes[0].location.file.name == 't.c'
- assert tu_nodes[0].location.line == 4
+ assert tu_nodes[0].location.line == 1
assert tu_nodes[0].location.column == 8
assert tu_nodes[0].hash > 0
assert tu_nodes[0].translation_unit is not None
More information about the cfe-commits
mailing list