Revision: 17935
          http://sourceforge.net/p/gate/code/17935
Author:   markagreenwood
Date:     2014-05-09 08:56:35 +0000 (Fri, 09 May 2014)
Log Message:
-----------
some < and <= negative number jape tests

Modified Paths:
--------------
    gate/trunk/src/test/gate/jape/functest/BaseJapeTests.java
    gate/trunk/src/test/gate/jape/functest/TestConstraints.java

Added Paths:
-----------
    
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-le-double-negative.jape
    
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-le-int-negative.jape
    
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-lt-double-negative.jape
    
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-lt-int-negative.jape

Modified: gate/trunk/src/test/gate/jape/functest/BaseJapeTests.java
===================================================================
--- gate/trunk/src/test/gate/jape/functest/BaseJapeTests.java   2014-05-09 
01:23:20 UTC (rev 17934)
+++ gate/trunk/src/test/gate/jape/functest/BaseJapeTests.java   2014-05-09 
08:56:35 UTC (rev 17935)
@@ -243,6 +243,7 @@
        if (ac != null)
            ac.annotate(doc);
        Set<Annotation> orderedResults = runTransducer(doc, japeResourcePath, 
ontologyURL);
+       //DocumentStaxUtils.writeDocument(doc, new 
File("/home/mark/test"+(count++)+".xml"));
        return orderedResults;
     }
 

Modified: gate/trunk/src/test/gate/jape/functest/TestConstraints.java
===================================================================
--- gate/trunk/src/test/gate/jape/functest/TestConstraints.java 2014-05-09 
01:23:20 UTC (rev 17934)
+++ gate/trunk/src/test/gate/jape/functest/TestConstraints.java 2014-05-09 
08:56:35 UTC (rev 17935)
@@ -320,6 +320,78 @@
   /**
    * GATE Tao: 8.1.3
    * 
+   * Operator: <
+   * Case: Integer
+   * 
+   * @throws Exception
+   */
+  public void test813OpLessThanIntegerNegative() throws Exception {
+    final String japeFilePath = 
"/jape/test/japefiles/Req-GATETao-8.1.3-op-lt-int-negative.jape";
+    final String docFilePath = "/jape/test/docfiles/Req-GATETao-8.1.3.txt";
+    
+    String[] expectedResults = {"OpLessThan"};
+    int[] expectedStartOffsets = {17};
+    int[] expectedEndOffsets = {20};
+    doCommonTest(japeFilePath, docFilePath, expectedResults, 
expectedStartOffsets, expectedEndOffsets, annoCreator813Operators);
+  }
+  
+  /**
+   * GATE Tao: 8.1.3
+   * 
+   * Operator: <
+   * Case: Double
+   * 
+   * @throws Exception
+   */
+  public void test813OpLessThanDoubleNegative() throws Exception {
+    final String japeFilePath = 
"/jape/test/japefiles/Req-GATETao-8.1.3-op-lt-double-negative.jape";
+    final String docFilePath = "/jape/test/docfiles/Req-GATETao-8.1.3.txt";
+    
+    String[] expectedResults = {"OpLessThan", "OpLessThan"};
+    int[] expectedStartOffsets = {17, 26};
+    int[] expectedEndOffsets = {20, 33};
+    doCommonTest(japeFilePath, docFilePath, expectedResults, 
expectedStartOffsets, expectedEndOffsets, annoCreator813Operators);
+  }
+  
+  /**
+   * GATE Tao: 8.1.3
+   * 
+   * Operator: <=
+   * Case: Integer
+   * 
+   * @throws Exception
+   */
+  public void test813OpLessEqualsIntegerNegative() throws Exception {
+    final String japeFilePath = 
"/jape/test/japefiles/Req-GATETao-8.1.3-op-le-int-negative.jape";
+    final String docFilePath = "/jape/test/docfiles/Req-GATETao-8.1.3.txt";
+    
+    String[] expectedResults = {"OpLessThan"};
+    int[] expectedStartOffsets = {17};
+    int[] expectedEndOffsets = {20};
+    doCommonTest(japeFilePath, docFilePath, expectedResults, 
expectedStartOffsets, expectedEndOffsets, annoCreator813Operators);
+  }
+  
+  /**
+   * GATE Tao: 8.1.3
+   * 
+   * Operator: <=
+   * Case: Double
+   * 
+   * @throws Exception
+   */
+  public void test813OpLessEqualsDoubleNegative() throws Exception {
+    final String japeFilePath = 
"/jape/test/japefiles/Req-GATETao-8.1.3-op-le-double-negative.jape";
+    final String docFilePath = "/jape/test/docfiles/Req-GATETao-8.1.3.txt";
+    
+    String[] expectedResults = {"OpLessThan"};
+    int[] expectedStartOffsets = {26};
+    int[] expectedEndOffsets = {33};
+    doCommonTest(japeFilePath, docFilePath, expectedResults, 
expectedStartOffsets, expectedEndOffsets, annoCreator813Operators);
+  }
+  
+  /**
+   * GATE Tao: 8.1.3
+   * 
    * Operator: ==
    * Case: Natural number
    * 

Added: 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-le-double-negative.jape
===================================================================
--- 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-le-double-negative.jape
                         (rev 0)
+++ 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-le-double-negative.jape
 2014-05-09 08:56:35 UTC (rev 17935)
@@ -0,0 +1,9 @@
+Phase: Test
+Options: control = appelt
+
+Rule:OpEquals
+(
+       {Token.double <= -273.15}
+):bind 
+--> 
+:bind.SomeAnnotation = {rule="OpLessThan"}

Added: 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-le-int-negative.jape
===================================================================
--- 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-le-int-negative.jape
                            (rev 0)
+++ 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-le-int-negative.jape
    2014-05-09 08:56:35 UTC (rev 17935)
@@ -0,0 +1,9 @@
+Phase: Test
+Options: control = appelt
+
+Rule:OpEquals
+(
+       {Token.int <= -10}
+):bind 
+--> 
+:bind.SomeAnnotation = {rule="OpLessThan"}

Added: 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-lt-double-negative.jape
===================================================================
--- 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-lt-double-negative.jape
                         (rev 0)
+++ 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-lt-double-negative.jape
 2014-05-09 08:56:35 UTC (rev 17935)
@@ -0,0 +1,9 @@
+Phase: Test
+Options: control = appelt
+
+Rule:OpEquals
+(
+       {Token.int < -8.1} | {Token.double < -8.1}
+):bind 
+--> 
+:bind.SomeAnnotation = {rule="OpLessThan"}

Added: 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-lt-int-negative.jape
===================================================================
--- 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-lt-int-negative.jape
                            (rev 0)
+++ 
gate/trunk/src/test/gate/resources/jape/test/japefiles/Req-GATETao-8.1.3-op-lt-int-negative.jape
    2014-05-09 08:56:35 UTC (rev 17935)
@@ -0,0 +1,9 @@
+Phase: Test
+Options: control = appelt
+
+Rule:OpEquals
+(
+       {Token.int < -9}
+):bind 
+--> 
+:bind.SomeAnnotation = {rule="OpLessThan"}

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to