makefile really improved on header dependencies
This commit is contained in:
28
tests/includes/tests_stack.hpp
Normal file
28
tests/includes/tests_stack.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef TESTS_STACK_HPP
|
||||
# define TESTS_STACK_HPP
|
||||
|
||||
#include "tests_utils.hpp"
|
||||
|
||||
|
||||
// toogle between test ft and stl
|
||||
// *************************
|
||||
#ifdef STL
|
||||
namespace ft = std;
|
||||
#else
|
||||
#include "stack.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
// templates print
|
||||
// *****************************************
|
||||
template <class T, class cont>
|
||||
void print(ft::stack<T,cont>& st, std::string name) {
|
||||
|
||||
std::cout << "\n" << name << ":(map)\n";
|
||||
for (int i = st.size(); i > 0 ; i--, st.pop())
|
||||
std::cout << "[" << i << "]" << st.top() << " ";
|
||||
std::cout << "\nsize:" << st.size() << "\n";
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user