| 92 | } |
| 93 | |
| 94 | Datum |
| 95 | plunit_assert_false_message(PG_FUNCTION_ARGS) |
| 96 | { |
| 97 | char *message = assert_get_message(fcinfo, 2, "plunit.assert_false exception"); |
| 98 | bool condition = PG_GETARG_BOOL(0); |
| 99 | |
| 100 | if (PG_ARGISNULL(0) || condition) |
| 101 | ereport(ERROR, |
| 102 | (errcode(ERRCODE_CHECK_VIOLATION), |
| 103 | errmsg("%s", message), |
| 104 | errdetail("Plunit.assertation fails (assert_false)."))); |
| 105 | |
| 106 | PG_RETURN_VOID(); |
| 107 | } |
| 108 | |
| 109 | /**************************************************************** |
| 110 | * plunit.assert_null |
no test coverage detected