Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CDT Junit tests

I think this is to prevent a ICPPASTQualifiedName from containing another ICPPASTQualifiedName, indirectly in the case of a template id.

In CPPASTQualifiedName:
 * Qualified name, which can contain any other name (unqualified, operator-name, conversion name,
 * template id).

Take a::b::c::d

if q2 = c::d
and q1 = a::b::q2

then if you want d :
IASTName realLastName = q1.getLastName();
while (realLastName instanceof ICPPASTQualifiedName) {
  realLastName = realLastName.getLastName();

It looks like CPPASTQualifiedName wants to avoid this and always stay "flat".

If you allow a template id to have a qualified name, then you could create something like this:


( ) qualified names
[ ] template ids

also a::b::c::d<int> could be expressed as

(a::b::[(c::d)<int>]) or
(a::[(b::c::d)<int>]) or

On 11-03-12 10:45 AM, Alena Laskavaia wrote:
Thanks it helps. So it is failing before
    public void setTemplateName(IASTName name) {
    	assert !(name instanceof ICPPASTQualifiedName) && !(name
instanceof ICPPASTTemplateId);

name is ICPPASTQualifiedName

Why it not suppose to be?

On Sat, Mar 12, 2011 at 10:29 AM, James Blackburn
<jamesblackburn@xxxxxxxxx> wrote:

On 12 March 2011 15:20, Alena Laskavaia <elaskavaia.cdt@xxxxxxxxx> wrote:
Only one test remains failing

I tried to disable it but it does not fail on my host. Does somebody
know why it may fail or can reproduce it?
I think to make it fail you'll need to run the JUnit with -ea set on your VM
(enable asserts).  As to why it fails, I have no idea...
cdt-dev mailing list

Back to the top