Changeset 8262 in josm for trunk


Ignore:
Timestamp:
2015-04-25T15:44:33+02:00 (4 years ago)
Author:
bastiK
Message:

see #10217 - "fix" test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/util/RotationAngleTest.java

    r8251 r8262  
    99
    1010    @Test
    11     public void testParseRad() throws Exception {
    12         assertThat(RotationAngle.buildStaticRotation("0.54rad").getRotationAngle(null), is(0.54));
    13         assertThat(RotationAngle.buildStaticRotation("1.").getRotationAngle(null), is(1.));
    14     }
    15 
    16     @Test
    17     public void testParseDeg() throws Exception {
    18         assertThat(RotationAngle.buildStaticRotation("180°").getRotationAngle(null), is(Math.PI));
    19         assertThat(RotationAngle.buildStaticRotation("90deg").getRotationAngle(null), is(Math.PI / 2));
    20     }
    21 
    22     @Test
    23     public void testParseGrad() throws Exception {
    24         assertThat(RotationAngle.buildStaticRotation("200grad").getRotationAngle(null), is(Math.PI));
    25         assertThat(RotationAngle.buildStaticRotation("100grad").getRotationAngle(null), is(Math.PI / 2));
    26         assertThat(RotationAngle.buildStaticRotation("400grad").getRotationAngle(null), is(Math.PI * 2));
    27     }
    28 
    29     @Test
    30     public void testParseTurn() throws Exception {
    31         assertThat(RotationAngle.buildStaticRotation("0.5turn").getRotationAngle(null), is(Math.PI));
    32         assertThat(RotationAngle.buildStaticRotation("0.25turn").getRotationAngle(null), is(Math.PI / 2));
    33         assertThat(RotationAngle.buildStaticRotation("1turn").getRotationAngle(null), is(Math.PI * 2));
    34     }
    35 
    36     @Test
    3711    public void testParseCardinal() throws Exception {
    3812        assertThat(RotationAngle.buildStaticRotation("south").getRotationAngle(null), is(Math.PI));
     
    4317    @Test(expected = IllegalArgumentException.class)
    4418    public void testParseFail() throws Exception {
    45         RotationAngle.buildStaticRotation("0.54bad");
     19        RotationAngle.buildStaticRotation("bad");
    4620    }
    4721
Note: See TracChangeset for help on using the changeset viewer.