summaryrefslogtreecommitdiff
path: root/src/lib.rs
blob: 2f498520eaa983d89f91064637530e2c536657b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

pub struct BCH {
    n: u32,
}

impl BCH {
    pub fn new(n: u32) -> BCH {
        BCH {
            n
        }
    }

    pub fn decode(self) -> u32{
        return self.n
    }
}

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

    #[test]
    fn it_works() {
        let bch = BCH::new(3);
        assert_eq!(bch.decode(), 3);
    }
}