metron-dev mailing list archives

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

    https://github.com/apache/incubator-metron/pull/257#discussion_r79698302
  
    --- 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 --
    
    The `ImmutableMap.of("casey","casey")`(besides promoting your global brand ;) ) do nothing
for these tests, right?  It'd be more clear, if we removed those.  Everything else looks good.
 I'm a +1 if we can take care of this small issue.


---
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