turn test into const assert

This commit is contained in:
Folkert 2022-05-04 23:47:01 +02:00
parent c5ff1ef803
commit 12ed674f61
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -19,6 +19,8 @@ use crate::mem_pool::shallow_clone::ShallowClone;
pub type TypeId = NodeId<Type2>;
const TYPE2_SIZE: () = assert!(std::mem::size_of::<Type2>() == 3 * 8 + 4);
#[derive(Debug)]
pub enum Type2 {
Variable(Variable), // 4B
@ -47,11 +49,6 @@ pub enum Type2 {
Erroneous(Problem2), // 24B
}
#[test]
fn type2_size() {
assert_eq!(std::mem::size_of::<Type2>(), 28); // 24B + pad
}
#[derive(Debug)]
pub enum Problem2 {
CanonicalizationProblem,