aboutsummaryrefslogblamecommitdiff
path: root/tests/common/mod.rs
blob: 18918bf13448c062d4b60f7443666435833e8206 (plain) (tree)
1
2
3
4
5
6
7
8
9
10




                                                           


                                          

                       

                               
 







                                                                                                                                
                                                                                         

      











                                                                      


                                
 
                                      
                                    
                              
               

 
                                             
                                                                         
                                                   








                                                                                
                                                   



                                                 
                                                                       
                                                   

                                                                                    
              

     
                                                                                   
                                                   

                                      
                                                    
              
                                                                                  



         
                              







                                                                        



                                         
 


                                                                       


     
                                                                 

                                                   
                                                                                          

                                                            
                                                                     


                                       
                                                    



                                                                            
                    
                       




                                                                 

                                                                        

     
                                                                 
                                                   
                                      
                                                   

                                        
                                

     
                                                                      
                                                   

                                                                                      

     



























                                           































































                                                                      
                   

                                                  









                                               
                                    




                                   







                                                                        





                                                         


                                                                      

                                           

                                                       

             
                                       


                                       


                                                                                              



                                                              
                              

     
                                                         
                                                  
                                              
                                                    





                                                      

















                                                                   



                              







                                                               
#[cfg(test)]
#[allow(dead_code)]

extern crate growthring;
use growthring::wal::{WALFile, WALStore, WALPos, WALBytes};
use indexmap::{IndexMap, map::Entry};
use rand::Rng;
use std::collections::{HashMap, hash_map};
use std::cell::RefCell;
use std::rc::Rc;
use std::convert::TryInto;
use std::collections::VecDeque;

thread_local! {
    //pub static RNG: RefCell<rand::rngs::StdRng> = RefCell::new(<rand::rngs::StdRng as rand::SeedableRng>::from_seed([0; 32]));
    pub static RNG: RefCell<rand::rngs::ThreadRng> = RefCell::new(rand::thread_rng());
}

pub fn gen_rand_letters(i: usize) -> String {
    //let mut rng = rand::thread_rng();
    RNG.with(|rng| {
        (0.