JASPL  0.2
Just Another Signal Processing Library
test_ouroborus.h
1 #ifndef TEST_OUROBORUS_H
2 #define TEST_OUROBORUS_H
3 
4 // C System-Headers
5 //
6 // C++ System headers
7 #include <iostream>
8 // Boost Headers
9 //
10 // Project Specific Headers
11 #include "ouroboros.h"
12 
13 namespace jaspl {
14 
15 void test_ouroboros() {
16 
17  std::vector<int> test_data { 1, 2, 3, 4, 5, 6 };
18  std::vector<int> test_data_2 { 0, 0, 0, 0 };
19 
20  ouroborus<int> tester( 10 );
21  tester.TailInsert( test_data.data(), test_data.size() );
22  tester.TailInsert( test_data.data(), test_data.size() );
23  tester.TailInsert( test_data_2.data(), test_data_2.size() );
24 
25  auto tail_read_test = tester.TailRead( 3 );
26 
27  for ( const auto& elem: tail_read_test ) {
28  std::cout << elem << ",";
29  }
30  std::cout << std::endl;
31 
32  std::cout << tester << std::endl;
33 
34 }
35 
36 }
37 
38 #endif // TEST_OUROBORUS_H