summaryrefslogtreecommitdiff
path: root/viz/src/lib.rs
blob: b40c78a5f325d9790a6c53719e74ece7fe8255a0 (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
28
29
30
31
//! This library defines a binary format to store graph data such that
//! a client which understands the format can easily print the graph,
//! centered at any specific node, with any scope.  The library also
//! provides functions to print graphs in this format.
//!
//! This way, one does not need a server to print and interact with
//! graphs.
//!
//! # Graph representation
//!
//! The library uses the [`Graph`][graph::Graph] trait from the crate
//! [graph].  Only the functions exposed from the trait are used by
//! this library.  So the users can also implement the trait and then
//! print the graph data represented by other graph crates.

extern crate graph;

pub fn add(left: usize, right: usize) -> usize {
    left + right
}

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

    #[test]
    fn it_works() {
        let result = add(2, 2);
        assert_eq!(result, 4);
    }
}