To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

lib.rs 811 Bytes
Newer Older
1
extern crate mu;
qinsoon's avatar
qinsoon committed
2
#[macro_use]
3
4
extern crate log;
extern crate simple_logger;
qinsoon's avatar
qinsoon committed
5
6
#[macro_use]
extern crate maplit;
7

8
mod test_ir;
qinsoon's avatar
qinsoon committed
9
mod test_compiler;
10
mod test_runtime;
11
mod test_api;
qinsoon's avatar
qinsoon committed
12

qinsoon's avatar
qinsoon committed
13
14
15
mod common {
    use std::fmt;
    
16
    pub fn assert_vector_ordered <T: fmt::Debug> (left: &Vec<T>, right: &Vec<T>) {
qinsoon's avatar
qinsoon committed
17
18
19
        assert_debug_str(left, right);
    }
    
20
21
22
23
24
25
26
27
28
    pub fn assert_vector_no_order <T: Ord + fmt::Debug + Clone> (left: &Vec<T>, right: &Vec<T>) {
        let mut left_clone = left.clone();
        left_clone.sort();
        let mut right_clone = right.clone();
        right_clone.sort();
        
        assert_debug_str(left_clone, right_clone);
    }
    
qinsoon's avatar
qinsoon committed
29
30
    pub fn assert_debug_str<T: fmt::Debug, U: fmt::Debug> (left: T, right: U) {
        assert_eq!(format!("{:?}", left), format!("{:?}", right))
qinsoon's avatar
qinsoon committed
31
    }
32
}