Shuffle assertions

This commit is contained in:
Tim Schaub
2016-08-09 00:05:25 -06:00
parent c40e1bc29b
commit d02cf1e7a9
39 changed files with 154 additions and 143 deletions

View File

@@ -130,7 +130,7 @@ ol.structs.LRUCache.prototype.forEach = function(f, opt_this) {
*/
ol.structs.LRUCache.prototype.get = function(key) {
var entry = this.entries_[key];
ol.assert(entry !== undefined,
ol.asserts.assert(entry !== undefined,
15); // Tried to get a value for a key that does not exist in the cache
if (entry === this.newest_) {
return entry.value_;
@@ -244,7 +244,7 @@ ol.structs.LRUCache.prototype.replace = function(key, value) {
ol.structs.LRUCache.prototype.set = function(key, value) {
goog.DEBUG && console.assert(!(key in {}),
'key is not a standard property of objects (e.g. "__proto__")');
ol.assert(!(key in this.entries_),
ol.asserts.assert(!(key in this.entries_),
16); // Tried to set a value for a key that is used already
var entry = /** @type {ol.LRUCacheEntry} */ ({
key_: key,