Calls smart_assert, but creates its own assertion closure using
        the expected and provided values with the '==' operator
179733
def assert_equals(self, actual_val, expected_val, failure_message='Expected values to be equal: "{}" and "{}"'):
        
        assertion = lambda: expected_val == actual_val
        self.webdriver_assert(assertion, unicode(failure_message).format(actual_val, expected_val))
1069451
def assert_match(actual_string, expected_re, message="")
      _wrap_assertion {
        full_message = build_message(message, "Expected <?> to match <?>", actual_string, expected_re)
        assert_block(full_message) {
          expected_re =~ actual_string
        }
        Regexp.last_match
      }
    end
532851
function AssertionError(options) {
  var assertionError = Object.create(AssertionError.prototype);

  if (utils.isString(options))
    options = { message: options };
  if ("actual" in options)
    assertionError.actual = options.actual;
  if ("expected" in options)
    assertionError.expected = options.expected;
  if ("operator" in options)
    assertionError.operator = options.operator;

  assertionError.message = options.message;
  assertionError.stack = new Error().stack;
  return assertionError;
}
606212
def __assert_less(expected, returned):
        '''
        
        '''
        result = "Pass"
        try:
            assert (expected < returned), "{0} not False".format(returned)
        except AssertionError as err:
            result = "Fail: " + six.text_type(err)
        return result
182454
function matchingAssertions(should, Assertion) {
  var i = should.format;

  /**
   * Asserts if given object match `other` object, using some assumptions:
   * First object matched if they are equal,
   * If `other` is a regexp and given object is a string check on matching with regexp
   * If `other` is a regexp and given object is an array check if all elements matched regexp
   * If `other` is a regexp and given object is an object check values on matching regexp
   * If `other` is a function check if this function throws AssertionError on given object or return false - it will be assumed as not matched
   * If `other` is an object check if the same keys matched with above rules
   * All other cases failed.
   *
   * Usually it is right idea to add pre type assertions, like `.String()` or `.Object()` to be sure assertions will do what you are expecting.
   * Object iteration happen by keys (properties with enumerable: true), thus some objects can cause small pain. Typical example is js
   * Error - it by default has 2 properties `name` and `message`, but they both non-enumerable. In this case make sure you specify checking props (see examples).
   *
   * @name match
   * @memberOf Assertion
   * @category assertion matching
   * @param {*} other Object to match
   * @param {string} [description] Optional message
   * @example
   * 'foobar'.should.match(/^foo/);
   * 'foobar'.should.not.match(/^bar/);
   *
   * ({ a: 'foo', c: 'barfoo' }).should.match(/foo$/);
   *
   * ['a', 'b', 'c'].should.match(/[a-z]/);
   *
   * (5).should.not.match(function(n) {
   *   return n < 0;
   * });
   * (5).should.not.match(function(it) {
   *    it.should.be.an.Array();
   * });
   * ({ a: 10, b: 'abc', c: { d: 10 }, d: 0 }).should
   * .match({ a: 10, b: /c$/, c: function(it) {
   *    return it.should.have.property('d', 10);
   * }});
   *
   * [10, 'abc', { d: 10 }, 0].should
   * .match({ '0': 10, '1': /c$/, '2': function(it) {
   *    return it.should.have.property('d', 10);
   * }});
   *
   * var myString = 'abc';
   *
   * myString.should.be.a.String().and.match(/abc/);
   *
   * myString = {};
   *
   * myString.should.match(/abc/); //yes this will pass
   * //better to do
   * myString.should.be.an.Object().and.not.empty().and.match(/abc/);//fixed
   *
   * (new Error('boom')).should.match(/abc/);//passed because no keys
   * (new Error('boom')).should.not.match({ message: /abc/ });//check specified property
   */
  Assertion.add("match", function(other, description) {
    this.params = { operator: "to match " + i(other), message: description };

    if (eq(this.obj, other).length !== 0) {
      if (other instanceof RegExp) {
        // something - regex

        if (typeof this.obj == "string") {
          this.assert(other.exec(this.obj));
        } else if (null != this.obj && typeof this.obj == "object") {
          var notMatchedProps = [],
            matchedProps = [];
          forEach(
            this.obj,
            function(value, name) {
              if (other.exec(value)) {
                matchedProps.push(formatProp(name));
              } else {
                notMatchedProps.push(formatProp(name) + " (" + i(value) + ")");
              }
            },
            this
          );

          if (notMatchedProps.length) {
            this.params.operator += "\n    not matched properties: " + notMatchedProps.join(", ");
          }
          if (matchedProps.length) {
            this.params.operator += "\n    matched properties: " + matchedProps.join(", ");
          }

          this.assert(notMatchedProps.length === 0);
        } else {
          // should we try to convert to String and exec?
          this.assert(false);
        }
      } else if (typeof other == "function") {
        var res;

        res = other(this.obj);

        //if we throw exception ok - it is used .should inside
        if (typeof res == "boolean") {
          this.assert(res); // if it is just boolean function assert on it
        }
      } else if (typeof this.obj == "object" && this.obj != null && (isPlainObject(other) || Array.isArray(other))) {
        // try to match properties (for Object and Array)
        notMatchedProps = [];
        matchedProps = [];

        forEach(
          other,
          function(value, key) {
            try {
              should(this.obj)
                .have.property(key)
                .which.match(value);
              matchedProps.push(formatProp(key));
            } catch (e) {
              if (e instanceof should.AssertionError) {
                notMatchedProps.push(formatProp(key) + " (" + i(this.obj[key]) + ")");
              } else {
                throw e;
              }
            }
          },
          this
        );

        if (notMatchedProps.length) {
          this.params.operator += "\n    not matched properties: " + notMatchedProps.join(", ");
        }
        if (matchedProps.length) {
          this.params.operator += "\n    matched properties: " + matchedProps.join(", ");
        }

        this.assert(notMatchedProps.length === 0);
      } else {
        this.assert(false);
      }
    }
  });

  /**
   * Asserts if given object values or array elements all match `other` object, using some assumptions:
   * First object matched if they are equal,
   * If `other` is a regexp - matching with regexp
   * If `other` is a function check if this function throws AssertionError on given object or return false - it will be assumed as not matched
   * All other cases check if this `other` equal to each element
   *
   * @name matchEach
   * @memberOf Assertion
   * @category assertion matching
   * @alias Assertion#matchEvery
   * @param {*} other Object to match
   * @param {string} [description] Optional message
   * @example
   * [ 'a', 'b', 'c'].should.matchEach(/\w+/);
   * [ 'a', 'a', 'a'].should.matchEach('a');
   *
   * [ 'a', 'a', 'a'].should.matchEach(function(value) { value.should.be.eql('a') });
   *
   * { a: 'a', b: 'a', c: 'a' }.should.matchEach(function(value) { value.should.be.eql('a') });
   */
  Assertion.add("matchEach", function(other, description) {
    this.params = {
      operator: "to match each " + i(other),
      message: description
    };

    forEach(
      this.obj,
      function(value) {
        should(value).match(other);
      },
      this
    );
  });

  /**
  * Asserts if any of given object values or array elements match `other` object, using some assumptions:
  * First object matched if they are equal,
  * If `other` is a regexp - matching with regexp
  * If `other` is a function check if this function throws AssertionError on given object or return false - it will be assumed as not matched
  * All other cases check if this `other` equal to each element
  *
  * @name matchAny
  * @memberOf Assertion
  * @category assertion matching
  * @param {*} other Object to match
  * @alias Assertion#matchSome
  * @param {string} [description] Optional message
  * @example
  * [ 'a', 'b', 'c'].should.matchAny(/\w+/);
  * [ 'a', 'b', 'c'].should.matchAny('a');
  *
  * [ 'a', 'b', 'c'].should.matchAny(function(value) { value.should.be.eql('a') });
  *
  * { a: 'a', b: 'b', c: 'c' }.should.matchAny(function(value) { value.should.be.eql('a') });
  */
  Assertion.add("matchAny", function(other, description) {
    this.params = {
      operator: "to match any " + i(other),
      message: description
    };

    this.assert(
      some(this.obj, function(value) {
        try {
          should(value).match(other);
          return true;
        } catch (e) {
          if (e instanceof should.AssertionError) {
            // Caught an AssertionError, return false to the iterator
            return false;
          }
          throw e;
        }
      })
    );
  });

  Assertion.alias("matchAny", "matchSome");
  Assertion.alias("matchEach", "matchEvery");
}
778821
public static void assertEquals(String message, Object expected, Object actual) {
        if (expected == null && actual != null || expected != null && !expected.equals(actual)) {
            fail(message);
        }
    }
1186570
def assert(assertion, desc = nil)
      if assertion
        pass
      else
        what = if block_given?
          yield
        else
          "Failed assert: assertion was "\
          "`#{Assert::U.show(assertion, __assert_config__)}`."
        end
        fail(fail_message(desc, what))
      end
    end
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);
    });
}
1276732
def sign_assertion(self, statement, **kwargs):
        
        return self.sign_statement(
                statement, class_name(saml.Assertion()), **kwargs)
397603
function isTrue(value, message, id) {
    if (message === void 0) { message = ''; }
    if (id === void 0) { id = ''; }
    if (this.enabled && value !== true) {
        throw ValueException.unexpectedValue(assertionTypes.IS_TRUE, value, true, message, id);
    }
}
276836
function AssertionError(actual, expected, phrase, base) {
  this.name = 'AssertionError';
  this.actual = actual;
  this.expected = expected;
  this.message = 'expected ' + objectDisplay(actual) + ' ' +
      phrase + ' ' +
    objectDisplay(expected);

  if (typeof actual === 'object' || typeof expected === 'object') {
    this.showDiff = true;
  }

  Error.captureStackTrace(this, base);
}
214760
def assert_raises(expected=StandardError)
      begin
        yield
      rescue => actual
        return actual if actual.kind_of?(expected)
        raise Failure.new("Failure: Unexpected Exception", expected, actual)
      end
      raise Failure.new("Failure: No Exception", expected, "Nothing raised.")
    end
1329082
function assertEqualsDelta(msg, expected, actual, epsilon) {
	var args = this.argsWithOptionalMsg_(arguments, 4);
	jstestdriver.assertCount++;
	msg = args[0];
	expected = args[1];
	actual = args[2];
	epsilon = args[3];

	if (!compareDelta_(expected, actual, epsilon)) {
		this.fail(msg + 'expected ' + epsilon + ' within ' +
							this.prettyPrintEntity_(expected) +
							' but was ' + this.prettyPrintEntity_(actual) + '');
	}
	return true;
}
537151
public function assertEquals($expected, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false) {
        $this->callAssertMethod(__FUNCTION__, [
            'expected' => $expected,
            'additionalParams' => [
                $delta,
                $maxDepth,
                $canonicalize,
                $ignoreCase,
            ],
        ]);
    }
176418
static function assertLooselyIdenticalIterable(iterable $expected, $actual, bool $canonicalizeKeys = false, string $message = '')
    {
        static::assertThat($actual, static::looselyIdenticalIterable($expected, $canonicalizeKeys), $message);
    }
599063
function(value, assertionObject) {
    for(var name in assertionObject) {
      if (assertionObject.hasOwnProperty(name)) {
        args = [value];
        args = args.concat(assertionObject[name]);
        this[name].apply(this, args);
      }
    }
  }
247617
def assertType(var, *allowedTypes):
    
    if not isinstance(var, *allowedTypes):
        raise NotImplementedError("This operation is only supported for {}. "\
            "Instead found {}".format(str(*allowedTypes), type(var)))