Giter Site home page Giter Site logo

llefranc / 42_containator Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 1.0 471 KB

Personnal project: a tester for the 42 ft_containers project made with @hherin.

Makefile 1.34% C++ 97.26% Shell 1.40%
42 42school 42paris 42born2code containers ft-containers ft-containers-test tester test-containers

42_containator's Issues

Unable to test ft::vector without ft::stack

Environment: MacOS Mojave (@42), clang++-9

include_your_files.hpp:

#ifndef INCLUDE_YOUR_FILES_HPP
#define INCLUDE_YOUR_FILES_HPP

// ---------------------------------------------------------------------------
// INSERT HERE THE PATH TO YOUR FILES. COMMENT THE CONTAINERS YOU DON'T WANT 
// TO TEST. FT_PAIR IS MANDATORY TESTER WON'T COMPILE OTHERWISE.

// Mandatory in order to compile the tester. If you don't already have it, 
// you can include my ft_pair ("./includes_and_utils/my_ft_pair.hpp").
#include "./includes_and_utils/my_ft_pair.hpp"

#include "../src/vector.hpp"   // Comment if you don't want to test VECTOR   
//#include "../42_ft_containers/stack.hpp"
//#include "../42_ft_containers/list.hpp"     // Comment if you don't want to test LIST
//#include "../42_ft_containers/stack.hpp"    // Comment if you don't want to test STACK
//#include "../42_ft_containers/queue.hpp"    // Comment if you don't want to test QUEUE
//#include "../42_ft_containers/map.hpp"      // Comment if you don't want to test MAP

// ---------------------------------------------------------------------------

#endif

Compilation error when making:

select_your_tests/select_containers.cpp:131:30: error: no template named 'stack' in namespace 'ft'; did you mean 'std::stack'?
    constructStackQueue<int, ft::stack<int, std::list<int> >, std::list<int> >(arrInt, testNonConstStack<ft::stack<int, std::list<int> > >);
                             ^~~~~~~~~
                             std::stack
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stack:113:28: note: 'std::stack' declared here
class _LIBCPP_TEMPLATE_VIS stack
                           ^
select_your_tests/select_containers.cpp:131:106: error: no template named 'stack' in namespace 'ft'; did you mean 'std::stack'?
    constructStackQueue<int, ft::stack<int, std::list<int> >, std::list<int> >(arrInt, testNonConstStack<ft::stack<int, std::list<int> > >);
                                                                                                         ^~~~~~~~~
                                                                                                         std::stack
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stack:113:28: note: 'std::stack' declared here
class _LIBCPP_TEMPLATE_VIS stack
                           ^
select_your_tests/select_containers.cpp:132:38: error: no template named 'stack' in namespace 'ft'; did you mean 'std::stack'?
    constructStackQueue<std::string, ft::stack<std::string, std::list<std::string> >, std::list<std::string> >(arrString, testNonConstStack<ft::stack<std::string, std::list<std::string> > >);
                                     ^~~~~~~~~
                                     std::stack
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stack:113:28: note: 'std::stack' declared here
class _LIBCPP_TEMPLATE_VIS stack
                           ^
select_your_tests/select_containers.cpp:132:141: error: no template named 'stack' in namespace 'ft'; did you mean 'std::stack'?
    constructStackQueue<std::string, ft::stack<std::string, std::list<std::string> >, std::list<std::string> >(arrString, testNonConstStack<ft::stack<std::string, std::list<std::string> > >);
                                                                                                                                            ^~~~~~~~~
                                                                                                                                            std::stack
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stack:113:28: note: 'std::stack' declared here
class _LIBCPP_TEMPLATE_VIS stack
                           ^
4 errors generated.
make: *** [select_your_tests/select_containers.o] Error 1

After quick investigation the problem is coming from select_your_tests/select_containers.cpp where most tests are commented except stack and vector. By commenting stack it works as expected. Maybe an issue with a shell script, did not take time to figure it out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.