-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestWrap.cpp
More file actions
41 lines (32 loc) · 825 Bytes
/
TestWrap.cpp
File metadata and controls
41 lines (32 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
** EPITECH PROJECT, 2026
** santa_rush4_2
** File description:
** TestWrap
*/
#include "src/object/wrap/Wrap.hpp"
#include "src/object/wrap/box/Box.hpp"
#include "src/object/wrap/giftpaper/Giftpaper.hpp"
#include "src/object/toy/Toy.hpp"
#include "src/object/toy/Teddy.hpp"
#include "src/object/Object.hpp"
#include <gtest/gtest.h>
Object *MyUnitTests(Object **listObj)
{
listObj[1]->wrapMeThat(listObj[0]);
listObj[2]->wrapMeThat(listObj[1]);
std::cout << *listObj[1] << std::endl;
return listObj[2];
}
TEST(TestWrap, testWrap)
{
Object **list = new Object*[3];
Teddy teddy = Teddy();
list[0] = &teddy;
Box box = Box();
list[1] = &box;
Giftpaper giftpaper = Giftpaper();
list[2] = &giftpaper;
Object *obj = MyUnitTests(list);
std::cout << *obj << std::endl;
}