Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
core.internal.dassert
- string
_d_assert_fail
(string op, A)(auto ref scope const Aa
); - Generates rich assert error messages for unary expressionsThe unary expression assert(!una) will be turned into assert(!una,
_d_assert_fail
!"!"(una)). This routine simply acts as if the user wrote assert(una == false).Parameters:op Operator that was used in the expression, currently only "!" is supported. A a
Result of the expression that was used in assert before its implicit conversion to bool. Returns:A string such as "a != true" or "a == true". - string
_d_assert_fail
(string comp, A, B)(auto ref scope const Aa
, auto ref scope const Bb
); - Generates rich assert error messages for binary expressionsThe binary expression assert(x == y) will be turned into assert(x == y,
_d_assert_fail
!"=="(x, y)).Parameters:comp Comparison operator that was used in the expression. A a
Left hand side operand. B b
Right hand side operand. Returns:A string such as "a $comp b".
Copyright © 1999-2021 by the D Language Foundation | Page generated by
Ddoc on Thu Feb 18 11:53:12 2021