@@ -0,0 +1,2175 @@
+/*%0A * This file is released under terms of BSD license%0A * See LICENSE file for more information%0A */%0A%0Apackage cx2x.translator.language;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport cx2x.xcodeml.exception.IllegalDirectiveException;%0Aimport org.junit.Test;%0A%0A/**%0A * JUnit test class for the CLAW language parser and information holding class.%0A *%0A * @author clementval%0A */%0Apublic class ClawLanguageTest %7B%0A%0A  /**%0A   * Test various input for the CLAW loop fusion directive.%0A   */%0A  @Test%0A  public void FusionTest()%7B%0A    // Valid directives%0A    analyzeValidClawLoopFusion(%22claw loop-fusion%22, null);%0A    analyzeValidClawLoopFusion(%22claw loop-fusion group(g1)%22, %22g1%22);%0A    analyzeValidClawLoopFusion(%22claw loop-fusion group( g1 )%22, %22g1%22);%0A    analyzeValidClawLoopFusion(%22claw loop-fusion group ( g1   ) %22, %22g1%22);%0A    analyzeValidClawLoopFusion(%22claw loop-fusiongroup(g1)%22, %22g1%22);%0A%0A    // Unvalid directives%0A    analyzeUnvalidClawLanguage(%22claw loop-fusion group%22);%0A    analyzeUnvalidClawLanguage(%22claw loop-fusion (i,j,k)%22);%0A    analyzeUnvalidClawLanguage(%22claw loop-fusion group()%22);%0A    analyzeUnvalidClawLanguage(%22claw loop-fusion group(   )%22);%0A  %7D%0A%0A  /**%0A   * Assert the result for valid loop fusion CLAW directive%0A   * @param raw       Raw string valud of the CLAW directive to be analyzed.%0A   * @param groupName Group name to be found if any.%0A   */%0A  private void analyzeValidClawLoopFusion(String raw, String groupName)%7B%0A    try %7B%0A      ClawLanguage l = ClawLanguage.analyze(raw);%0A      assertEquals(ClawDirective.LOOP_FUSION, l.getDirective());%0A      if(groupName != null)%7B%0A        assertTrue(l.hasGroupOption());%0A        assertEquals(groupName, l.getGroupName());%0A      %7D else %7B%0A        assertFalse(l.hasGroupOption());%0A        assertNull(l.getGroupName());%0A      %7D%0A    %7D catch(IllegalDirectiveException idex)%7B%0A      fail();%0A    %7D%0A  %7D%0A%0A  /**%0A   * Assert any unvalid claw raw input%0A   * @param raw Raw string valud of the CLAW directive to be analyzed.%0A   */%0A  private void analyzeUnvalidClawLanguage(String raw)%7B%0A    ClawLanguage l = null;%0A    try %7B%0A      l = ClawLanguage.analyze(raw);%0A      fail();%0A    %7D catch (IllegalDirectiveException pex)%7B%0A      assertNull(l);%0A    %7D%0A  %7D%0A%7D%0A

Add new junit class for the CLAW language parser + loop-fusion test