test/intl/assert.js
/**
 * Throws if obj is not of given type.
 */
Throws if obj is not of given type.
Throws if obj is not of given type .
function assertInstanceof(obj, type) {
  if (!(obj instanceof type)) {
    var actualTypeName = null;
    var actualConstructor = Object.getPrototypeOf(obj).constructor;
    if (typeof actualConstructor == "function") {
      actualTypeName = actualConstructor.name || String(actualConstructor);
    }
    throw new Error('Object <' + obj + '> is not an instance of <' +
                    (type.name || type) + '>' +
                    (actualTypeName ? ' but of < ' + actualTypeName + '>' : ''));
  }
}
function assertInstanceof ( obj , type ) { if ( ! ( obj instanceof type ) ) { var actualTypeName = null ; var actualConstructor = Object . getPrototypeOf ( obj ) . constructor ; if ( typeof actualConstructor == "function" ) { actualTypeName = actualConstructor . name || String ( actualConstructor ) ; } throw new Error ( 'Object <' + obj + '> is not an instance of <' + ( type . name || type ) + '>' + ( actualTypeName ? ' but of < ' + actualTypeName + '>' : '' ) ) ; } }
Throws if obj is not of given type.
Throws if obj is not of given type .