Github user justinleet commented on a diff in the pull request:

    https://github.com/apache/metron/pull/1268#discussion_r234303547
  
    --- Diff: 
metron-stellar/stellar-common/src/test/java/org/apache/metron/stellar/dsl/functions/BasicStellarTest.java
 ---
    @@ -916,6 +916,53 @@ public void testShortCircuit_conditional() throws 
Exception {
         Assert.assertEquals("foo", run("if NOT('metron' in [ 'metron', 
'metronicus'] ) then THROW('expression') else 'foo'", new HashMap<>()));
       }
     
    --- End diff --
    
    Added test cases for statement following the pattern
    ```
        // IF TO_UPPER('foo') == 'FOO'
        //   THEN IF GET_FIRST(MAP(['test_true'], x -> TO_UPPER(x))) == 
'TEST_TRUE'
        //     THEN match{ var1 < 12 => 'less', var1 >= 10 => 'more', default 
=> 'default'}
        //   ELSE 'b'
        // ELSE 'c'
    ```
    
    Does this meet what you're looking for? I'm not sure how deep you want to 
go down the rabbit hole, but this seems like it's hitting a pretty good amount 
of stuff on the inner IF (multiple functions, list syntax, lambda, ==, along 
with a match in the then.


---

Reply via email to