This is an automated email from the ASF dual-hosted git repository.
tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new dd67846f2 test(core): remove assert_size tests (#7167)
dd67846f2 is described below
commit dd67846f2d26d9c84d6154ce57e58dfe6825d116
Author: Xuanwo <[email protected]>
AuthorDate: Wed Jan 28 19:15:04 2026 +0800
test(core): remove assert_size tests (#7167)
---
core/core/src/lib.rs | 14 --------------
core/core/src/types/error.rs | 11 -----------
2 files changed, 25 deletions(-)
diff --git a/core/core/src/lib.rs b/core/core/src/lib.rs
index 5d9039efd..ab4d95aa5 100644
--- a/core/core/src/lib.rs
+++ b/core/core/src/lib.rs
@@ -173,21 +173,7 @@ pub mod services;
#[cfg(test)]
mod tests {
- use std::mem::size_of;
-
use super::*;
- /// This is not a real test case.
- ///
- /// We assert our public structs here to make sure we don't introduce
- /// unexpected struct/enum size change.
- #[cfg(target_pointer_width = "64")]
- #[test]
- fn assert_size() {
- assert_eq!(16, size_of::<Operator>());
- assert_eq!(360, size_of::<Entry>());
- assert_eq!(336, size_of::<Metadata>());
- assert_eq!(1, size_of::<EntryMode>());
- }
trait AssertSendSync: Send + Sync {}
impl AssertSendSync for Entry {}
diff --git a/core/core/src/types/error.rs b/core/core/src/types/error.rs
index 2639b9e1b..998cdd4c5 100644
--- a/core/core/src/types/error.rs
+++ b/core/core/src/types/error.rs
@@ -507,7 +507,6 @@ impl From<Error> for io::Error {
#[cfg(test)]
mod tests {
- use std::mem::size_of;
use std::sync::LazyLock;
use anyhow::anyhow;
@@ -528,16 +527,6 @@ mod tests {
backtrace: None,
});
- /// This is not a real test case.
- ///
- /// We assert our public structs here to make sure we don't introduce
- /// unexpected struct/enum size change.
- #[cfg(target_pointer_width = "64")]
- #[test]
- fn assert_size() {
- assert_eq!(88, size_of::<Error>());
- }
-
#[test]
fn test_error_display() {
let s = format!("{}", LazyLock::force(&TEST_ERROR));