TODO: this is an internal API, this should be an assert
977208
function Morph(parent, start, end, domHelper, contextualElement) {
      if (parent.nodeType === 11) {
        ensureStartEnd(start, end);
        this.element = null;
      } else {
        this.element = parent;
      }
      this._parent = parent;
      this.start = start;
      this.end = end;
      this.domHelper = domHelper;
      ensureContext(contextualElement);
      this.contextualElement = contextualElement;
      this.reset();
    }
1309850
function assertObj(obj: any, name: string) {
  return obj ? assert(_.isObjectLike(obj), `${name} must be an object`) : false;
}
1336818
function(done, promise, expectedState, expectedData, isNegative) {
    function verify(promiseState) {
      return function(data) {
        var test = verifyState(promiseState, expectedState);

        if (test.pass) {
          test = verifyData(data, expectedData);
        }

        if (!test.pass && !isNegative) {
          done.fail(new Error(test.message));
          return;
        }

        done();
      }
    }

    promise.then(
      verify(PROMISE_STATE.RESOLVED),
      verify(PROMISE_STATE.REJECTED)
    );

    return { pass: true };
  }
560770
private AssertionError createAssertionError() {
		// convert both sides to strings
		String expected = TreeQuery.toString(expectedDef, expectedRoot, expectedToString);
		String actual = TreeQuery.toString(actualDef, actualRoot, actualToString);
		// try to create a junit ComparisonFailure
		for (String exceptionType : Arrays.asList(
				"org.junit.ComparisonFailure",
				"junit.framework.ComparisonFailure")) {
			try {
				return createComparisonFailure(exceptionType, expected, actual);
			} catch (Exception e) {}
		}
		// we'll have to settle for a plain-jane AssertionError
		return new AssertionError("Expected:\n" + expected + "\n\nActual:\n" + actual);
	}
765119
public static Boolean assertTrue(Boolean value, String message) {
        if (!Boolean.valueOf(value))
            throw new IllegalStateException(message);

        return value;
    }
1354503
function assertEquals(assert, actual, expected, message) {
  const assertionType = Symbol.for('@@meta:magical:assertion-type');
  const rest          = Symbol.for('@@meta:magical:assertion-rest');
  const keys          = Object.keys;

  function isSetoid(value) {
    return value
    &&     typeof value.equals === 'function';
  }

  function isRecord(value) {
    return value
    &&     value[assertionType] === 'record';
  }

  function check(predicate, ...values) {
    return values.every(predicate);
  }

  function getSpecialArrayLength(array) {
    const rests = array.map((x, i) => [x, i]).filter(pair => pair[0] === rest);
    if (rests.length > 1 || (rests[0] && rests[0][1] !== array.length - 1)) {
      assert.ok(false, `${message}. Assertions only support a single trailing rest indication for arrays currently.`);
    }
    return (rests[0] || [null, array.length])[1];
  }

  function compareArrays(left, right) {
    const expectedLength = getSpecialArrayLength(right);
    assert.ok(Array.isArray(left), `${message}. The LHS is not an array.`);
    if (left.length < expectedLength) {
      assert.ok(false, `${message}. The LHS does not have the minimum expected length (${left.length} < ${expectedLength})`);
    }
    for (let i = 0; i < expectedLength; ++i) {
      compare(left[i], right[i]);
    }
  }

  function compareRecord(left, right) {
    const isPartial = right[rest];
    assert.ok(Object(left) === left, message);
    if (!isPartial) {
      assert.deepStrictEqual(keys(left).sort(), keys(right).sort(), `${message}. The objects have different keys ([${keys(left).sort().join(', ')}] vs. [${keys(right).sort().join(', ')}])`);
    }
    Object.keys(right).forEach(key => {
      if (!(key in left)) {
        assert.ok(false, `${message}. The expected key ${key} is not present in the actual object.`);
      }
      compare(left[key], right[key]);
    });
  }


  function compare(l, r) {
    return check(isSetoid, l, r)  ?  assert.ok(l.equals(r), `${message}. The LHS (${l}) setoid instance says the LHS and RHS (${r}) are not equal.`)
    :      Array.isArray(r)       ?  compareArrays(l, r)
    :      isRecord(r)            ?  compareRecord(l, r)
    :      /* otherwise */           assert.deepStrictEqual(l, r, `${message}. The LHS (${l}) and the RHS (${r}) are not structually equal.`);
  }

  compare(actual, expected);
}
1356243
function assertThrows(test) {
    var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Error;
    var contains = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];


    if (!Array.isArray(contains)) contains = [contains];

    var shouldErrorName = typeof error === 'string' ? error : error.name;

    var nonThrown = new Error('util.assertThrowsAsync(): Missing rejection' + (error ? ' with ' + error.name : ''));
    var ensureErrorMatches = function ensureErrorMatches(error) {
        // wrong type
        if (error.constructor.name != shouldErrorName) {
            return new Error('\n             util.assertThrowsAsync(): Wrong Error-type\n             - is    : ' + error.constructor.name + '\n             - should: ' + shouldErrorName + '\n             - error: ' + error.toString() + '\n             ');
        }
        // check if contains
        var errorString = error.toString();
        if (contains.length > 0 && (0, _utils.oneOfArrayNotInString)(contains, errorString)) {
            return new Error('\n               util.assertThrowsAsync(): Error does not contain\n               - should contain: ' + contains + '\n               - is string: ' + error.toString() + '\n             ');
        }
        return false;
    };

    return new Promise(function (res, rej) {
        var val = void 0;
        try {
            val = test();
        } catch (err) {
            var wrong = ensureErrorMatches(err);
            if (wrong) rej(wrong);else res(err);
            return;
        }
        if ((0, _isPromise2['default'])(val)) {
            val.then(function () {
                // has not thrown
                rej(nonThrown);
            })['catch'](function (err) {
                var wrong = ensureErrorMatches(err);
                if (wrong) rej(wrong);else res(err);
            });
        } else rej(nonThrown);
    });
}
1271562
static void assertInstantiable(Class<?> c) {
    int modifiers = c.getModifiers();
    if (Modifier.isInterface(modifiers)) {
      throw new UnsupportedOperationException("Interface can't be instantiated! Interface name: " + c.getName());
    }
    if (Modifier.isAbstract(modifiers)) {
      throw new UnsupportedOperationException("Abstract class can't be instantiated! Class name: " + c.getName());
    }
  }
810936
public <T> void assertThat(T actual, org.hamcrest.Matcher<? super T> matcher) {
    try {
      org.hamcrest.MatcherAssert.assertThat(actual, matcher);
    } catch (AssertionError e) {
      fail(e);
    }
  }
1183008
def assertion(func):
    """"""
    func = assertionmethod(func)
    setattr(AssertionBuilder, func.__name__, func)
    return func
1202440
private final void assertIsLocPathIterator(Expression expr1, ExpressionOwner eo) 
    throws RuntimeException 
  {
		if(!(expr1 instanceof LocPathIterator))
		{
			String errMsg;
			if(expr1 instanceof Variable)
			{
				errMsg = "Programmer's assertion: expr1 not an iterator: "+
				          ((Variable)expr1).getQName();
			}
			else
			{
				errMsg = "Programmer's assertion: expr1 not an iterator: "+
				          expr1.getClass().getName();
			}
			throw new RuntimeException(errMsg + ", "+
				          eo.getClass().getName()+" "+
				          expr1.exprGetParent());
		}
  }
380757
def on_assert(self, node):    # ('test', 'msg')
        """"""
        if not self.run(node.test):
            self.raise_exception(node, exc=AssertionError, msg=node.msg)
        return True
612484
function AssertResult( name, ns, time, error, skip ) {
	var self = this;

	if ( ! ( self instanceof AssertResult ) ) {
		return new AssertResult( name, ns, time, error );
	}

	self.name = name || '';
	self.nsPath = ns || '';
	self.ns = self.nsPath + '.' + self.name;
	self.time = time;
	self.error = error;
	self.skip = skip;
}
1161857
private int assertToken(final StreamTokenizer tokeniser, Reader in, final String token)
            throws IOException, ParserException {
        return assertToken(tokeniser, in, token, false, false);
    }
298952
private static void assertNextToken(
			final JsonParser p,
			final JsonToken requiredJsonToken) throws IOException {
		final JsonToken jsonToken = p.nextToken();
		if (jsonToken != requiredJsonToken) {
			throw new JsonMappingException(p, String.format("Expected token %s (was %s)", requiredJsonToken, jsonToken));
		}
	}
478855
function isNotFunction(value, message, id) {
    if (message === void 0) { message = ''; }
    if (id === void 0) { id = ''; }
    if (this.enabled && typeof value === 'function') {
        throw TypeException.unexpectedType(assertionTypes.IS_NOT_FUNCTION, value, '<function>', message, id);
    }
}
1269684
function error(utils) {
  const target = this._obj;
  isValidation(target);
  const error = target.error || null,
      json = JSON.stringify(target, null, '\t');
  this.assert(null !== error,
      '#{this} should have error but does not: ' + json,
      '#{this} should not not have error but does: ' + json
  );
  utils.flag(this, 'object', error);
}