Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
[FIXED JENKINS-20545] Fixed old name of GCC parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Nov 13, 2013
1 parent a82c621 commit e90a42d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Expand Up @@ -150,7 +150,7 @@ public String toString() {
* @return <code>true</code> if this parser is in the specified group
*/
public boolean isInGroup(final String group) {
return name.equals(group) || getId().equals(group);
return name.equals(group) || getId().equalsIgnoreCase(group);
}

/**
Expand Down
Expand Up @@ -59,8 +59,23 @@ public void testIssue17762() {
String oldClang = "Apple LLVM Compiler (Clang)";
String newClang = "Clang (LLVM based)";

assertEquals("Wrong new API implementations", 1, ParserRegistry.getParsers(oldClang).size());
assertEquals("Wrong old API implementations", 1, ParserRegistry.getParsers(newClang).size());
assertEquals("Wrong old API implementations", 1, ParserRegistry.getParsers(oldClang).size());
assertEquals("Wrong new API implementations", 1, ParserRegistry.getParsers(newClang).size());

assertTrue("Parser does not exist: " + oldClang, ParserRegistry.exists(oldClang));
assertTrue("Parser does not exist: " + newClang, ParserRegistry.exists(newClang));
}

/**
* Verifies that the registry detects old and new API extensions and maps them correctly.
*/
@Test
public void testIssue20545() {
String oldClang = "GNU Compiler 4 (gcc)";
String newClang = "GNU C Compiler 4 (gcc)";

assertEquals("Wrong old API implementations", 2, ParserRegistry.getParsers(oldClang).size());
assertEquals("Wrong new API implementations", 2, ParserRegistry.getParsers(newClang).size());

assertTrue("Parser does not exist: " + oldClang, ParserRegistry.exists(oldClang));
assertTrue("Parser does not exist: " + newClang, ParserRegistry.exists(newClang));
Expand Down

0 comments on commit e90a42d

Please sign in to comment.