Skip to content

Commit 6ee5620

Browse files
authored
Merge pull request #73 from google/closure_namespace
Closure namespace
2 parents b18b2ab + 93519a5 commit 6ee5620

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

js/closure/openlocationcode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
var code = OpenLocationCode.recoverNearest('8F+6X', 47.4, 8.6);
5858
*/
5959

60-
goog.module('google.openlocationcode');
60+
goog.module('openlocationcode.OpenLocationCode');
6161

6262
// A separator used to break the code into two parts to aid memorability.
6363
var SEPARATOR = '+';

js/closure/openlocationcode_test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
goog.module('openlocationcode_test');
2323
goog.setTestOnly('openlocationcode_test');
2424

25-
var openlocationcode = goog.require('google.openlocationcode');
25+
var OpenLocationCode = goog.require('openlocationcode.OpenLocationCode');
2626
var testSuite = goog.require('goog.testing.testSuite');
2727
goog.require('goog.testing.asserts');
2828

@@ -162,9 +162,9 @@ testSuite({
162162
for (var i = 0; i < tests.length; i++) {
163163
var td = tests[i];
164164
// Decode the code.
165-
var ca = openlocationcode.decode(td[0]);
165+
var ca = OpenLocationCode.decode(td[0]);
166166
// Encode the center coordinates.
167-
var code = openlocationcode.encode(td[1], td[2], ca.codeLength);
167+
var code = OpenLocationCode.encode(td[1], td[2], ca.codeLength);
168168
// Did we get the same code?
169169
assertEquals('Test ' + 1, td[0], code);
170170
// Check that the decode gave the correct coordinates.
@@ -250,9 +250,9 @@ testSuite({
250250
for (var i = 0; i < tests.length; i++) {
251251
var td = tests[i];
252252
// Shorten the code.
253-
var short = openlocationcode.shorten(td[0], td[1], td[2]);
253+
var short = OpenLocationCode.shorten(td[0], td[1], td[2]);
254254
assertEquals('Test ' + i, short, td[3]);
255-
var recovered = openlocationcode.recoverNearest(short, td[1], td[2]);
255+
var recovered = OpenLocationCode.recoverNearest(short, td[1], td[2]);
256256
assertEquals('Test ' + i, recovered, td[0]);
257257
}
258258
},
@@ -367,9 +367,9 @@ testSuite({
367367
];
368368
for (var i = 0; i < tests.length; i++) {
369369
var td = tests[i];
370-
assertEquals('Test ' + i, openlocationcode.isValid(td[0]), td[1]);
371-
assertEquals('Test ' + i, openlocationcode.isShort(td[0]), td[2]);
372-
assertEquals('Test ' + i, openlocationcode.isFull(td[0]), td[3]);
370+
assertEquals('Test ' + i, OpenLocationCode.isValid(td[0]), td[1]);
371+
assertEquals('Test ' + i, OpenLocationCode.isShort(td[0]), td[2]);
372+
assertEquals('Test ' + i, OpenLocationCode.isFull(td[0]), td[3]);
373373
}
374374
},
375375
});

0 commit comments

Comments
 (0)