summaryrefslogtreecommitdiff
path: root/src/lib.rs
blob: 40b4b77d4ec0b2ba7cd8bd5a67b6069c25ab7e05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
pub struct Dongle {
    vendor: u16,
    product: u16,
    name: &'static str
}

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

    #[test]
    fn dongle() {
        let _dongle = Dongle {
            vendor: 0x1234,
            product: 0x5678,
            name: "Test"
        };
        assert!(_dongle.name == "Test");
    }
}