| 119 | } |
| 120 | |
| 121 | IntVal ValidateFail(FunctionContext* context) { |
| 122 | EXPECT_FALSE(context->has_error()); |
| 123 | EXPECT_TRUE(context->error_msg() == NULL); |
| 124 | context->SetError("Fail"); |
| 125 | EXPECT_TRUE(context->has_error()); |
| 126 | EXPECT_TRUE(strcmp(context->error_msg(), "Fail") == 0); |
| 127 | return IntVal::null(); |
| 128 | } |
| 129 | |
| 130 | IntVal ValidateMem(FunctionContext* context) { |
| 131 | uint8_t* buffer = context->Allocate(0); |