codama_nodes/count_nodes/
count_node.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use crate::{FixedCountNode, PrefixedCountNode, RemainderCountNode};
use codama_nodes_derive::node_union;

#[node_union]
pub enum CountNode {
    Fixed(FixedCountNode),
    Prefixed(PrefixedCountNode),
    Remainder(RemainderCountNode),
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::HasKind;

    #[test]
    fn kind() {
        let node: CountNode = RemainderCountNode::new().into();
        assert_eq!(node.kind(), "remainderCountNode");
    }
}