()
| 531 | |
| 532 | #[test] |
| 533 | fn parse_nested_blocks() { |
| 534 | let src = r#" |
| 535 | [AnimationTree] |
| 536 | name = "Player" |
| 537 | [/AnimationTree] |
| 538 | [AnimationSlots] |
| 539 | Idle |
| 540 | Run |
| 541 | [/AnimationSlots] |
| 542 | [MoveBlend] |
| 543 | [Blend] |
| 544 | inputs = [@Idle, @Run] |
| 545 | weights = [1.0, 0.0] |
| 546 | mask = { objects=[Hero], fields=[position, rotation] } |
| 547 | [/Blend] |
| 548 | [/MoveBlend] |
| 549 | [Output] |
| 550 | input = @MoveBlend |
| 551 | [/Output] |
| 552 | "#; |
| 553 | let tree = parse_panimtree(src).expect("tree parse"); |
| 554 | assert_eq!(tree.name.as_ref(), "Player"); |
| 555 | assert_eq!(tree.slots.len(), 2); |
| 556 | assert_eq!(tree.nodes.len(), 1); |
| 557 | assert_eq!(tree.output.as_ref(), "MoveBlend"); |
| 558 | } |
| 559 | |
| 560 | #[test] |
| 561 | fn reject_unknown_ref() { |
nothing calls this directly
no test coverage detected