From ce8437ebdc73befb9673e10eb5a8d677b5e37d67 Mon Sep 17 00:00:00 2001 From: Arun Date: Fri, 28 Aug 2026 16:06:08 +0000 Subject: [PATCH] Move unit tests to integration tests --- src/lib.rs | 2 -- src/tests.rs => tests/smallvec.rs | 16 ++++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) rename src/tests.rs => tests/smallvec.rs (99%) diff --git a/src/lib.rs b/src/lib.rs index af120445..9e9aa3f0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -66,8 +66,6 @@ pub extern crate alloc; extern crate std; mod rawsmallvec; -#[cfg(test)] -mod tests; use alloc::alloc::Layout; use alloc::boxed::Box; diff --git a/src/tests.rs b/tests/smallvec.rs similarity index 99% rename from src/tests.rs rename to tests/smallvec.rs index e05f24d4..c3f6812c 100644 --- a/src/tests.rs +++ b/tests/smallvec.rs @@ -1,10 +1,10 @@ -use crate::{smallvec, SmallVec}; -use alloc::borrow::ToOwned; -use alloc::boxed::Box; -use alloc::rc::Rc; -use alloc::{vec, vec::Vec}; use core::hash::Hasher; use core::iter::FromIterator; +use smallvec::{smallvec, SmallVec}; +use std::borrow::ToOwned; +use std::boxed::Box; +use std::rc::Rc; +use std::{vec, vec::Vec}; #[test] pub fn test_zero() { @@ -926,10 +926,10 @@ const fn const_new_inner() -> SmallVec { SmallVec::::new() } const fn const_new_inline_sized() -> SmallVec { - crate::smallvec_inline![1; 4] + smallvec::smallvec_inline![1; 4] } const fn const_new_inline_args() -> SmallVec { - crate::smallvec_inline![1, 4] + smallvec::smallvec_inline![1, 4] } #[test] @@ -1075,7 +1075,7 @@ fn test_spare_capacity_mut() { mod buf_mut { use bytes::BufMut as _; - type SmallVec = crate::SmallVec; + type SmallVec = smallvec::SmallVec; #[test] fn test_smallvec_as_mut_buf() {