metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cestella <...@git.apache.org>
Subject [GitHub] incubator-metron pull request #257: METRON-426: Stellar does not support sci...
Date Tue, 20 Sep 2016 20:20:46 GMT
Github user cestella commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/257#discussion_r79702619
  
    --- Diff: metron-platform/metron-common/src/test/java/org/apache/metron/common/stellar/StellarTest.java
---
    @@ -173,6 +173,22 @@ public void testMapConstant() {
       }
     
       @Test
    +  public void testArithmetic() {
    +    {
    +      String query = "1 + 2";
    +      Assert.assertEquals(3, ((Number)run(query, ImmutableMap.of("casey", "casey"))).doubleValue(),
1e-3);
    +    }
    +    {
    +      String query = "1.2 + 2";
    +      Assert.assertEquals(3.2, ((Number)run(query, ImmutableMap.of("casey", "casey"))).doubleValue(),
1e-3);
    +    }
    +    {
    +      String query = "1.2e-3 + 2";
    +      Assert.assertEquals(1.2e-3 + 2, ((Number)run(query, ImmutableMap.of("casey", "casey"))).doubleValue(),
1e-3);
    +    }
    --- End diff --
    
    You got it. :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message