22 static const char *SOME_ERROR =
"whatever";
24 #if defined(ASSERTION_USED)
26 static void drop_unused_ARB_ERROR() {
29 static void drop_ARB_ERROR() {
32 static void overwrite_ARB_ERROR() {
53 void TEST_misuse_ARB_ERROR_crashtest() {
58 void TEST_class_ARB_ERROR() {
113 #if defined(ASSERTION_USED)
115 static void drop_ErrorOr0() {
116 ErrorOrInt e(
NULp, 42);
118 static void drop_ErrorOr1() {
119 ErrorOrInt e(SOME_ERROR, 0);
121 static void retrieve_unchecked_ErrorOr0() {
122 ErrorOrInt e(
NULp, 21);
123 int v = e.getValue();
126 static void retrieve_unchecked_ErrorOr1() {
127 ErrorOrInt e(SOME_ERROR, 0);
134 static ErrorOrInt generateErrorOr(
int i) {
135 return ErrorOrInt(
NULp, i);
137 static ErrorOrInt generateErrorOr(
const char *msg) {
138 return ErrorOrInt(msg, -1);
141 void TEST_misuse_ErrorOr_crashtest() {
147 void TEST_ErrorOr() {
150 ErrorOrInt e(SOME_ERROR, 0);
155 ErrorOrInt v(
NULp, 7);
162 ErrorOrInt e(SOME_ERROR, 0);
168 ErrorOrInt v(
NULp, 17);
174 ErrorOrInt v = generateErrorOr(17);
179 ErrorOrInt e = generateErrorOr(SOME_ERROR);
const char * GBS_global_string(const char *templat,...)
#define ARB_SIGSEGV(backtrace)
#define TEST_EXPECT(cond)
#define TEST_REJECT_NULL(n)
#define TEST_EXPECT_NULL(n)
#define TEST_EXPECT_CODE_ASSERTION_FAILS(cb)
#define TEST_EXPECT_EQUAL(expr, want)