mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Testcases for 181735, using function-ptrs.
This commit is contained in:
parent
929eec3053
commit
f3e552d7e3
2 changed files with 29 additions and 0 deletions
|
@ -13,8 +13,10 @@ package org.eclipse.cdt.internal.index.tests;
|
|||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
||||
|
@ -206,4 +208,18 @@ public class IndexBindingResolutionBugs extends IndexBindingResolutionTestBase {
|
|||
IBinding b0= getBindingFromASTName("id(*", 2);
|
||||
IBinding b1= getBindingFromASTName("id(6", 2);
|
||||
}
|
||||
|
||||
|
||||
// void func1(void);
|
||||
|
||||
// #include "header.h"
|
||||
//
|
||||
// int main(void)
|
||||
// {
|
||||
// void* v= func1;
|
||||
// }
|
||||
public void testBug181735() throws DOMException {
|
||||
IBinding b0 = getBindingFromASTName("func1;", 5);
|
||||
assertTrue(b0 instanceof IFunction);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,4 +70,17 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
IType returnType= f0.getType().getReturnType();
|
||||
assertTrue(returnType instanceof IBasicType);
|
||||
}
|
||||
|
||||
// void func1(void);
|
||||
|
||||
// #include "header.h"
|
||||
//
|
||||
// int main(void)
|
||||
// {
|
||||
// void* v= func1;
|
||||
// }
|
||||
public void _testBug181735() throws DOMException {
|
||||
IBinding b0 = getBindingFromASTName("func1;", 5);
|
||||
assertTrue(b0 instanceof IFunction);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue