/*
 * Created: Oct 20, 2002 at 8:42:30 PM
 * @author: Jeka
 */
package com.intellij.compiler;

import com.intellij.compiler.classParsing.GenericMethodSignature;
import com.intellij.compiler.classParsing.SignatureParsingException;
import com.intellij.compiler.make.MakeUtil;
import junit.framework.TestCase;

public class ParsingTest extends TestCase{

  public void testParseGenericSignature() {
    try {
      final GenericMethodSignature signature = GenericMethodSignature.parse("<T::Lcom/intellij/util/xml/GenericValue<*>;>(Ljava/util/Collection<TT;>;[Ljava/lang/String;)Ljava/lang/String;");
      assertTrue(signature != null);
    }
    catch (SignatureParsingException e) {
      assertTrue("NOT PARSED:" + e.getMessage(), false);
    }
  }

  public void testParseObjectType() {
    String parsed = null;

    parsed = MakeUtil.parseObjectType("Ljava/lang/String;", 0);
    assertEquals("Parsed incorrectly ", parsed, "java.lang.String");

    parsed = MakeUtil.parseObjectType("[Ljava/lang/String;", 0);
    assertEquals("Parsed incorrectly ", parsed, "java.lang.String");

    parsed = MakeUtil.parseObjectType("Z", 0);
    assertNull("Parsed incorrectly ", parsed);

  }
}

@@ -223,16 +223,64 @@
 eption;%0A
+import com.intellij.compiler.make.BoundsParser;%0A
 import c
@@ -791,16 +791,396 @@
  %7D%0A  %7D%0A%0A
+  public void testParseClassGenericSignature() %7B%0A    try %7B%0A      final String%5B%5D bounds = BoundsParser.getBounds(%22%3CSuper:Ljava/lang/Object;Sub:Ljava/lang/Object;%3ELcom/intellij/ide/DataAccessor%3CTSub;%3E;%22);%0A      assertTrue(bounds != null);%0A    %7D%0A    catch (SignatureParsingException e) %7B%0A      assertTrue(%22NOT PARSED:%22 + e.getMessage(), false);%0A      e.printStackTrace();%0A    %7D%0A  %7D%0A%0A
   public

fix generic class signature parse error