@@ -0,0 +1,3280 @@
+package org.monospark.spongematchers.parser.primitive;%0A%0Aimport static org.hamcrest.CoreMatchers.not;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.monospark.spongematchers.testutil.HamcrestSpongeMatchers.matches;%0A%0Aimport java.util.Optional;%0A%0Aimport org.junit.Test;%0Aimport org.monospark.spongematchers.matcher.SpongeMatcher;%0Aimport org.monospark.spongematchers.parser.SpongeMatcherParser;%0A%0Apublic class FloatingPointMatcherParserTest %7B%0A%0A    @Test%0A    public void parseMatcher_Range_ReturnsCorrectMatcher() %7B%0A        Optional%3CSpongeMatcher%3CDouble%3E%3E matcher = SpongeMatcherParser.FLOATING_POINT.parseMatcher(%22-1.2f-3.1f%22);%0A        %0A        assertTrue(matcher.isPresent());%0A        assertThat(matcher.get(), matches(-1.1D));%0A        assertThat(matcher.get(), matches(3D));%0A        assertThat(matcher.get(), not(matches(-2D)));%0A        assertThat(matcher.get(), not(matches(4D)));%0A    %7D%0A    %0A    @Test%0A    public void parseMatcher_Amount_ReturnsCorrectMatcher() %7B%0A        Optional%3CSpongeMatcher%3CDouble%3E%3E matcher = SpongeMatcherParser.FLOATING_POINT.parseMatcher(%22(-1f,3.1f,5.2f)%22);%0A        %0A        assertTrue(matcher.isPresent());%0A        assertThat(matcher.get(), matches(-1D));%0A        assertThat(matcher.get(), matches(3.1D));%0A        assertThat(matcher.get(), matches(5.2D));%0A        assertThat(matcher.get(), not(matches(2D)));%0A        assertThat(matcher.get(), not(matches(4D)));%0A    %7D%0A    %0A    @Test%0A    public void parseMatcher_Value_ReturnsCorrectMatcher() %7B%0A        Optional%3CSpongeMatcher%3CDouble%3E%3E matcher = SpongeMatcherParser.FLOATING_POINT.parseMatcher(%22.1f%22);%0A        %0A        assertTrue(matcher.isPresent());%0A        assertThat(matcher.get(), matches(.1D));%0A        assertThat(matcher.get(), not(matches(2D)));%0A    %7D%0A    %0A    @Test%0A    public void parseMatcher_GreaterThan_ReturnsCorrectMatcher() %7B%0A        Optional%3CSpongeMatcher%3CDouble%3E%3E matcher = SpongeMatcherParser.FLOATING_POINT.parseMatcher(%22%3E1f%22);%0A        %0A        assertTrue(matcher.isPresent());%0A        assertThat(matcher.get(), matches(2D));%0A        assertThat(matcher.get(), not(matches(1D)));%0A    %7D%0A    %0A    @Test%0A    public void parseMatcher_GreaterThanOrEqual_ReturnsCorrectMatcher() %7B%0A        Optional%3CSpongeMatcher%3CDouble%3E%3E matcher = SpongeMatcherParser.FLOATING_POINT.parseMatcher(%22%3E=1f%22);%0A        %0A        assertTrue(matcher.isPresent());%0A        assertThat(matcher.get(), matches(2D));%0A        assertThat(matcher.get(), matches(1D));%0A        assertThat(matcher.get(), not(matches(0.9D)));%0A    %7D%0A    %0A    @Test%0A    public void parseMatcher_LessThan_ReturnsCorrectMatcher() %7B%0A        Optional%3CSpongeMatcher%3CDouble%3E%3E matcher = SpongeMatcherParser.FLOATING_POINT.parseMatcher(%22%3C-1f%22);%0A        %0A        assertTrue(matcher.isPresent());%0A        assertThat(matcher.get(), matches(-2D));%0A        assertThat(matcher.get(), not(matches(0.2D)));%0A    %7D%0A    %0A    @Test%0A    public void parseMatcher_LessThanOrEqual_ReturnsCorrectMatcher() %7B%0A        Optional%3CSpongeMatcher%3CDouble%3E%3E matcher = SpongeMatcherParser.FLOATING_POINT.parseMatcher(%22%3C=1f%22);%0A        %0A        assertTrue(matcher.isPresent());%0A        assertThat(matcher.get(), matches(0D));%0A        assertThat(matcher.get(), matches(1D));%0A        assertThat(matcher.get(), not(matches(2D)));%0A    %7D%0A%7D%0A

Add unit tests for floating point parsing