@Test
    public void comparison() {
        assertThat(eval("3==3")).isEqualTo(1d);
        assertThat(eval("3<>4")).isEqualTo(1d);
        assertThat(eval("3<4")).isEqualTo(1d);
        assertThat(eval("3<=4")).isEqualTo(1d);
        assertThat(eval("3>=4")).isEqualTo(0d);
        assertThat(eval("4>=4")).isEqualTo(1d);
        assertThat(eval("(3+5) > (4+7)")).isEqualTo(0d);
        assertThat(eval("(3+5) < (4+7)")).isEqualTo(1d);

        assertThatThrownBy(() -> eval("3>>4"))
                .isInstanceOf(FormulaException.class).hasMessageContaining(UNEXPECTED_TOKEN.name()).hasMessageContaining(">");
        assertThatThrownBy(() -> eval("3<<4"))
                .isInstanceOf(FormulaException.class).hasMessageContaining(UNEXPECTED_TOKEN.name()).hasMessageContaining("<");
        assertThatThrownBy(() -> eval("3=>4"))
                .isInstanceOf(FormulaException.class).hasMessageContaining(UNEXPECTED_TOKEN.name()).hasMessageContaining(">");

        assertThat(eval("if(3>4;1;2)")).isEqualTo(2d);
        assertThat(eval("if(3<4;1;2)")).isEqualTo(1d);

        //comaring strings and number-string-mixes
        assertThat(eval("'a' > 'd'")).isEqualTo(0d);
        assertThat(eval("'a' <= 'd'")).isEqualTo(1.0d);
        assertThat(eval("'a' > 4")).isEqualTo(1d);
    }
checks whether a given error string is correct and has the right places highlighted with an error format
main/src/test/java/cgeo/geocaching/utils/formulas/FormulaTest.java