Skip to content

Commit 32b7efc

Browse files
committed
chore: clean test-only warnings
1 parent c389b46 commit 32b7efc

29 files changed

Lines changed: 8 additions & 49 deletions

crates/php-parser/tests/strict_types_position.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use php_parser::ast::ParseError;
21
use php_parser::lexer::Lexer;
32
use php_parser::parser::Parser;
43

crates/php-vm/src/vm/engine.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12212,11 +12212,8 @@ impl VM {
1221212212

1221312213
mod tests {
1221412214
use super::*;
12215-
use crate::builtins::string::php_strlen;
1221612215
use crate::compiler::chunk::{FuncParam, UserFunc};
1221712216
use crate::core::value::Symbol;
12218-
use crate::runtime::context::EngineContext;
12219-
use std::sync::Arc;
1222012217

1222112218
fn create_vm() -> VM {
1222212219
// Use EngineBuilder to properly register core extensions

crates/php-vm/src/vm/visibility.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl VM {
165165
#[cfg(test)]
166166
mod tests {
167167
use super::*;
168-
use crate::runtime::context::{ClassDef, EngineContext};
168+
use crate::runtime::context::EngineContext;
169169
use std::sync::Arc;
170170

171171
#[test]

crates/php-vm/tests/array_offset_access.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ mod common;
22

33
use common::run_code_vm_only;
44
use php_vm::core::value::Val;
5-
use php_vm::vm::engine::VM;
65

76
#[test]
87
fn test_array_offset_integer_key() {

crates/php-vm/tests/bcmath.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use php_vm::core::value::Val;
22
use php_vm::runtime::context::EngineBuilder;
3-
use php_vm::runtime::context::EngineContext;
43
use php_vm::vm::engine::VM;
54

65
fn create_test_vm() -> VM {

crates/php-vm/tests/class_constants.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ mod common;
22

33
use common::run_code_with_vm;
44
use php_vm::core::value::Val;
5-
use php_vm::vm::engine::VmError;
65

76
#[test]
87
fn test_class_constants_basic() {

crates/php-vm/tests/common/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
use php_vm::core::value::Val;
77
use php_vm::vm::engine::{VmError, VM};
8-
use php_vm::vm::executor::{execute_code, execute_code_with_config, ExecutionConfig};
8+
use php_vm::vm::executor::{execute_code, ExecutionConfig};
99

1010
/// Legacy helper: Execute PHP code and return the result value
1111
///
@@ -76,10 +76,12 @@ pub fn run_code_with_vm(code: &str) -> Result<(Val, VM), VmError> {
7676
}
7777

7878
/// Execute code and return just the VM (for inspecting internal state)
79+
#[allow(dead_code)]
7980
pub fn run_code_vm_only(code: &str) -> VM {
8081
run_code_with_vm(code).expect("code execution failed").1
8182
}
8283
// Result<Val, VmError>, String
84+
#[allow(dead_code)]
8385
pub fn run_code_capture_output(code: &str) -> Result<(Val, String), VmError> {
8486
use php_vm::compiler::emitter::Emitter;
8587
use php_vm::runtime::context::{EngineBuilder, RequestContext};

crates/php-vm/tests/constant_errors.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
use php_vm::runtime::context::EngineContext;
21
use php_vm::runtime::context::EngineBuilder;
32
use php_vm::vm::engine::{VmError, VM};
43
use std::rc::Rc;
5-
use std::sync::Arc;
64

75
#[test]
86
fn test_undefined_constant_error_message_format() {

crates/php-vm/tests/constants.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ fn run_code_expect_error(src: &str, expected_error: &str) {
55
use php_vm::runtime::context::{EngineBuilder, RequestContext};
66
use php_vm::vm::engine::VM;
77
use std::rc::Rc;
8-
use std::sync::Arc;
98

109
let engine_context = EngineBuilder::new().with_core_extensions().build().expect("Failed to build engine");
1110
let mut request_context = RequestContext::new(engine_context);

crates/php-vm/tests/datetime_test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use php_vm::core::value::Val;
22
use php_vm::runtime::context::EngineBuilder;
3-
use php_vm::runtime::context::EngineContext;
43
use php_vm::vm::engine::VM;
54

65
fn setup_vm() -> VM {

0 commit comments

Comments
 (0)