mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
turn test into const assert
This commit is contained in:
parent
c5ff1ef803
commit
12ed674f61
1 changed files with 2 additions and 5 deletions
|
@ -19,6 +19,8 @@ use crate::mem_pool::shallow_clone::ShallowClone;
|
||||||
|
|
||||||
pub type TypeId = NodeId<Type2>;
|
pub type TypeId = NodeId<Type2>;
|
||||||
|
|
||||||
|
const TYPE2_SIZE: () = assert!(std::mem::size_of::<Type2>() == 3 * 8 + 4);
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Type2 {
|
pub enum Type2 {
|
||||||
Variable(Variable), // 4B
|
Variable(Variable), // 4B
|
||||||
|
@ -47,11 +49,6 @@ pub enum Type2 {
|
||||||
Erroneous(Problem2), // 24B
|
Erroneous(Problem2), // 24B
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn type2_size() {
|
|
||||||
assert_eq!(std::mem::size_of::<Type2>(), 28); // 24B + pad
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Problem2 {
|
pub enum Problem2 {
|
||||||
CanonicalizationProblem,
|
CanonicalizationProblem,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue