         expect(selectionViews.length).toBe 2
         expect(selectionViews[1].regions.length).toBe 1
         region = selectionViews[1].regions[0]
-        expect(region.position().top).toBe(2 * lineHeight)
-        expect(region.position().left).toBe(7 * charWidth)
-        expect(region.height()).toBe lineHeight
-        expect(region.width()).toBe((25 - 7) * charWidth)
+        expect(region.position().top).toBeCloseTo(2 * lineHeight)
+        expect(region.position().left).toBeCloseTo(7 * charWidth)
+        expect(region.height()).toBeCloseTo lineHeight
+        expect(region.width()).toBeCloseTo((25 - 7) * charWidth)
 
     describe "when a selection changes", ->
       describe "when the selection is within a single line", ->

          expect(region2.width()).toBe(editor.renderedLines.width())

          region3 = selectionView.regions[2]
          expect(region3.position().top).toBe(6 * lineHeight)
          expect(region3.position().left).toBe(0)
          expect(region3.height()).toBe lineHeight
          expect(region3.width()).toBe(25 * charWidth)

      it "clears previously drawn regions before creating new ones", ->
        selection.setBufferRange(new Range({row: 2, column: 7}, {row: 4, column: 25}))


          expect(selectionView.regions.length).toBe 1
          region = selectionView.regions[0]
          expect(region.position().top).toBeCloseTo(2 * lineHeight)
          expect(region.position().left).toBeCloseTo(7 * charWidth)
          expect(region.height()).toBeCloseTo lineHeight
          expect(region.width()).toBeCloseTo((25 - 7) * charWidth)

      describe "when the selection spans 2 lines", ->
        it "covers the selection's range with 2 regions", ->
