You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 lines
2.1 KiB

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* vectorTester.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pohl <pohl@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/26 11:20:02 by pohl #+# #+# */
/* Updated: 2021/12/06 16:28:28 by paulohl ### ########.fr */
/* */
/* ************************************************************************** */
#include <vector>
#include <list>
#include <iostream>
#include "vector.hpp"
/* namespace ft = std; */
int vectorTester( void )
{
ft::vector<char> vect1(8, 'f');
ft::vector<char> vect2(4, 'g');
std::vector<char> asdf(5, 'x');
/* vect2.insert(vect2.begin() + 2, 2, 'v'); */
/* vect2.insert(vect2.begin() + 3, 1, 'x'); */
/* for (ft::vector<char>::iterator a = vect2.begin(); a != vect2.end(); a++) */
/* std::cout << ">> " << *a << std::endl; */
/* std::cout << "----------------" << std::endl; */
/* vect2.erase(vect2.begin() + 1); */
/* for (ft::vector<char>::iterator a = vect2.begin(); a != vect2.end(); a++) */
/* std::cout << ">> " << *a << std::endl; */
/* std::cout << "----------------" << std::endl; */
/* vect2.erase(vect2.begin()); */
/* vect2.erase(vect2.end() - 1); */
/* for (ft::vector<char>::iterator a = vect2.begin(); a != vect2.end(); a++) */
/* std::cout << ">> " << *a << std::endl; */
for (ft::vector<char>::iterator a = vect2.begin(); a != vect2.end(); a++)
std::cout << ">> " << *a << std::endl;
std::cout << "----------------" << std::endl;
vect2.assign(asdf.begin() + 2, asdf.end());
for (ft::vector<char>::iterator a = vect2.begin(); a != vect2.end(); a++)
std::cout << ">> " << *a << std::endl;
return 0;
}