package com.google.openlocationcode.tests;

import com.google.openlocationcode.OpenLocationCode;

import org.junit.Assert;
import org.junit.Test;

/** Tests size of rectangles defined by open location codes of various size. */
public class PrecisionTest {

  @Test
  public void testWidthInDegrees() {
    Assert.assertEquals(new OpenLocationCode("67000000+").decode().getLongitudeWidth(), 20., 0);
    Assert.assertEquals(new OpenLocationCode("67890000+").decode().getLongitudeWidth(), 1., 0);
    Assert.assertEquals(new OpenLocationCode("6789CF00+").decode().getLongitudeWidth(), 0.05, 0);
    Assert.assertEquals(new OpenLocationCode("6789CFGH+").decode().getLongitudeWidth(), 0.0025, 0);
    Assert.assertEquals(
        new OpenLocationCode("6789CFGH+JM").decode().getLongitudeWidth(), 0.000125, 0);
    Assert.assertEquals(
        new OpenLocationCode("6789CFGH+JMP").decode().getLongitudeWidth(), 0.00003125, 0);
  }

  @Test
  public void testHeightInDegrees() {
    Assert.assertEquals(new OpenLocationCode("67000000+").decode().getLatitudeHeight(), 20., 0);
    Assert.assertEquals(new OpenLocationCode("67890000+").decode().getLatitudeHeight(), 1., 0);
    Assert.assertEquals(new OpenLocationCode("6789CF00+").decode().getLatitudeHeight(), 0.05, 0);
    Assert.assertEquals(new OpenLocationCode("6789CFGH+").decode().getLatitudeHeight(), 0.0025, 0);
    Assert.assertEquals(
        new OpenLocationCode("6789CFGH+JM").decode().getLatitudeHeight(), 0.000125, 0);
    Assert.assertEquals(
        new OpenLocationCode("6789CFGH+JMP").decode().getLatitudeHeight(), 0.000025, 0);
  }
}

@@ -138,16 +138,82 @@
 it.Test;
+%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.JUnit4;
 %0A%0A/** Te
@@ -286,16 +286,39 @@
 ize. */%0A
+@RunWith(JUnit4.class)%0A
 public c

Update PrecisionTest.java