Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Location tests

  • Loading branch information...
commit 70d0a595d83d50a3ec020011d8a01edea2200abf 1 parent 9969501
@tmcw tmcw authored
Showing with 16 additions and 0 deletions.
  1. +1 −0  test/browser/index.html
  2. +15 −0 test/browser/spec/Location.js
View
1  test/browser/index.html
@@ -19,6 +19,7 @@
<script type="text/javascript" src="spec/Point.js"></script>
<script type="text/javascript" src="spec/Map.js"></script>
<script type="text/javascript" src="spec/Layer.js"></script>
+ <script type="text/javascript" src="spec/Location.js"></script>
<script type="text/javascript" src="spec/DragHandler.js"></script>
<script type="text/javascript" src="spec/MouseWheelHandler.js"></script>
<script type="text/javascript" src="spec/DoubleClickHandler.js"></script>
View
15 test/browser/spec/Location.js
@@ -0,0 +1,15 @@
+describe('Location', function() {
+ it('creates a location', function() {
+ var p = new MM.Location(0, 1);
+ expect(p.lon).toEqual(1);
+ expect(p.lat).toEqual(0);
+ });
+ it('can be copied', function() {
+ var p = new MM.Location(0, 1);
+ expect(p.lon).toEqual(1);
+ expect(p.lat).toEqual(0);
+ var cp = p.copy();
+ expect(cp.lon).toEqual(1);
+ expect(cp.lat).toEqual(0);
+ });
+});
Please sign in to comment.
Something went wrong with that request. Please try again.