()
| 3757 | |
| 3758 | #[test] |
| 3759 | fn parse_cold_blocks() { |
| 3760 | let code = "function %test() { |
| 3761 | block0 cold: |
| 3762 | return |
| 3763 | block1(v0: i32) cold: |
| 3764 | return |
| 3765 | block2(v1: i32): |
| 3766 | return |
| 3767 | }"; |
| 3768 | |
| 3769 | let mut parser = Parser::new(code); |
| 3770 | let func = parser.parse_function().unwrap().0; |
| 3771 | assert_eq!(func.layout.blocks().count(), 3); |
| 3772 | assert!(func.layout.is_cold(Block::from_u32(0))); |
| 3773 | assert!(func.layout.is_cold(Block::from_u32(1))); |
| 3774 | assert!(!func.layout.is_cold(Block::from_u32(2))); |
| 3775 | } |
| 3776 | } |
nothing calls this directly
no test coverage detected