test/polyline: Added two more test cases for unsigned integers

Again taken from the official documentation at Google.
This commit is contained in:
Tobias Bieniek
2013-03-10 17:00:37 +01:00
parent 680f3386ce
commit ce619871c2

View File

@@ -122,6 +122,9 @@ describe('ol.parser.polyline', function() {
expect(encodeUnsignedInteger(32 * 32)).toEqual('__@');
expect(encodeUnsignedInteger(5 * 32 * 32)).toEqual('__D');
expect(encodeUnsignedInteger(32 * 32 * 32)).toEqual('___@');
// from the "Encoded Polyline Algorithm Format" page at Google
expect(encodeUnsignedInteger(174)).toEqual('mD');
});
});
@@ -139,6 +142,9 @@ describe('ol.parser.polyline', function() {
expect(decodeUnsignedInteger('__@')).toEqual(32 * 32);
expect(decodeUnsignedInteger('__D')).toEqual(5 * 32 * 32);
expect(decodeUnsignedInteger('___@')).toEqual(32 * 32 * 32);
// from the "Encoded Polyline Algorithm Format" page at Google
expect(decodeUnsignedInteger('mD')).toEqual(174);
});
});
});