()
| 3242 | |
| 3243 | #[test] |
| 3244 | fn duplicate_block() { |
| 3245 | let ParseError { |
| 3246 | location, |
| 3247 | message, |
| 3248 | is_warning, |
| 3249 | } = Parser::new( |
| 3250 | "function %blocks() system_v { |
| 3251 | block0: |
| 3252 | block0: |
| 3253 | return 2", |
| 3254 | ) |
| 3255 | .parse_function() |
| 3256 | .unwrap_err(); |
| 3257 | |
| 3258 | assert_eq!(location.line_number, 3); |
| 3259 | assert_eq!(message, "duplicate entity: block0"); |
| 3260 | assert!(!is_warning); |
| 3261 | } |
| 3262 | |
| 3263 | #[test] |
| 3264 | fn number_of_blocks() { |
nothing calls this directly
no test coverage detected