Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ mirrors most of the PHP implementations of DataValue classes as specified in the
[![Build Status](https://secure.travis-ci.org/wmde/DataValuesJavaScript.png?branch=master)](http://travis-ci.org/wmde/DataValuesJavaScript)

## Release notes

### 0.11.0 (dev)
* Removed `globeCoordinate.GlobeCoordinate.getDecimal`
* Removed `getLowerBound`, `getUpperBound`, `getAmount` from QuantityValue
### 0.10.0 (2017-10-06)
* The library is now a pure JavaScript library.
* Removed MediaWiki ResourceLoader module definitions.
Expand Down
12 changes: 0 additions & 12 deletions lib/globeCoordinate/globeCoordinate.GlobeCoordinate.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,6 @@
*/
getPrecision: function() { return this._precision; },

/**
* @return {Object}
* @private
*/
getDecimal: function() {
return {
latitude: this._latitude,
longitude: this._longitude,
precision: this._precision
};
},

/**
* Compares the object to another GlobeCoordinate object and returns whether both represent
* the same information.
Expand Down
27 changes: 0 additions & 27 deletions src/values/QuantityValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@ var SELF
return this;
},

/**
* Returns the amount held by this quantity, as a string in standard format.
*
* @return {string}
*/
getAmount: function() {
return this._amount;
},

/**
* Returns the unit held by this quantity. Returns null in case of unit-less quantities.
*
Expand All @@ -98,24 +89,6 @@ var SELF
return this._unit;
},

/**
* Returns the quantity's lower boundary.
*
* @return {dataValues.DecimalValue|null}
*/
getLowerBound: function() {
return this._lowerBound;
},

/**
* Returns the quantity's upper boundary.
*
* @return {dataValues.DecimalValue|null}
*/
getUpperBound: function() {
return this._upperBound;
},

/**
* @inheritdoc
*/
Expand Down
23 changes: 3 additions & 20 deletions tests/lib/globeCoordinate/globeCoordinate.GlobeCoordinate.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
QUnit.module( 'globeCoordinate.GlobeCoordinate.js' );

QUnit.test( 'Basic checks', function( assert ) {
assert.expect( 9 );
assert.expect( 8 );
var c;

assert.throws(
Expand Down Expand Up @@ -59,37 +59,25 @@
'http://www.wikidata.org/entity/Q2',
'Verified getGlobe()'
);

assert.deepEqual(
c.getDecimal(),
{ latitude: 1.5, longitude: 1.5, precision: 0.1 },
'Verified getDecimal()'
);
} );

QUnit.test( 'Precision defaults to null', function( assert ) {
assert.expect( 3 );
assert.expect( 2 );
var c = new globeCoordinate.GlobeCoordinate( { latitude: 0, longitude: 0 } );

assert.ok(
c.getPrecision() === null,
'Verified getPrecision()'
);

assert.deepEqual(
c.getDecimal(),
{ latitude: 0, longitude: 0, precision: null },
'Verified getDecimal()'
);

assert.ok(
c.equals( c ),
'Validated equality'
);
} );

QUnit.test( 'Costum globe', function( assert ) {
assert.expect( 2 );
assert.expect( 1 );
var c = new globeCoordinate.GlobeCoordinate( {
latitude: 20,
longitude: 25.5,
Expand All @@ -101,11 +89,6 @@
'http://www.wikidata.org/entity/Q313',
'Verified getGlobe()'
);

assert.ok(
typeof c.getDecimal().globe === 'undefined',
'Verified getDecimal()'
);
} );

QUnit.test( 'Strict (in)equality', function( assert ) {
Expand Down