From bc4405de8ba1dab8a5e676e75f275c46dd1ea607 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 24 Nov 2023 18:30:39 +0100 Subject: [PATCH] Fixup bailout test --- src/embed/mod.rs | 2 +- src/flags.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/embed/mod.rs b/src/embed/mod.rs index d8f914f..9e9f2a8 100644 --- a/src/embed/mod.rs +++ b/src/embed/mod.rs @@ -268,7 +268,7 @@ mod tests { #[test] fn test_eval_bailout() { Embed::run(|| { - let result = Embed::eval("str_repeat('a', 100_000_000_000_000);"); + let result = Embed::eval("trigger_error(\"Fatal error\", E_USER_ERROR);"); assert!(result.is_err()); assert!(result.unwrap_err().is_bailout()); diff --git a/src/flags.rs b/src/flags.rs index 9e814d2..5036c7e 100644 --- a/src/flags.rs +++ b/src/flags.rs @@ -391,10 +391,10 @@ impl Display for DataType { mod tests { use super::DataType; use crate::ffi::{ - IS_ARRAY, IS_ARRAY_EX, IS_CALLABLE, IS_CONSTANT_AST, IS_CONSTANT_AST_EX, IS_DOUBLE, - IS_FALSE, IS_INDIRECT, IS_INTERNED_STRING_EX, IS_LONG, IS_NULL, IS_OBJECT, IS_OBJECT_EX, - IS_PTR, IS_REFERENCE, IS_REFERENCE_EX, IS_RESOURCE, IS_RESOURCE_EX, IS_STRING, - IS_STRING_EX, IS_TRUE, IS_UNDEF, IS_VOID, + IS_ARRAY, IS_ARRAY_EX, IS_CONSTANT_AST, IS_CONSTANT_AST_EX, IS_DOUBLE, IS_FALSE, + IS_INDIRECT, IS_INTERNED_STRING_EX, IS_LONG, IS_NULL, IS_OBJECT, IS_OBJECT_EX, IS_PTR, + IS_REFERENCE, IS_REFERENCE_EX, IS_RESOURCE, IS_RESOURCE_EX, IS_STRING, IS_STRING_EX, + IS_TRUE, IS_UNDEF, IS_VOID, }; use std::convert::TryFrom;