Skip to content
Snippets Groups Projects
Commit bc8cf842 authored by Le-Bao-Tin.Ha's avatar Le-Bao-Tin.Ha
Browse files

add test folder

parent ab7314b4
No related branches found
No related tags found
4 merge requests!8Modele,!7Modele,!6Modele,!5Modele Version 1
/*
// Created by Tiny on 3/14/2021.
*/
#ifndef INSAGAME_TEST_PERSONNAGE_H
#define INSAGAME_TEST_PERSONNAGE_H
#include <gtest/gtest.h>
extern "C"{
#include "personnage.h"
}
TEST(test_init_personnage,values_3_3_3_3_3_testimage){
Personnage person;
init_pers(&person,3,3,3,3,3,"testimage");
EXPECT_EQ(3,person.x_pers);
EXPECT_EQ(3,person.y_pers);
EXPECT_EQ(3,person.long_pers);
EXPECT_EQ(3,person.larg_pers);
EXPECT_STREQ("testimage",person.image_pers);
}
TEST(test_calcul_point,values_3_3){
Personnage person;
init_pers(&person,3,3,3,3,3,"testimage");
calcul_points_pers(&person);
EXPECT_EQ(6,person.x_hr);
EXPECT_EQ(3,person.y_hr);
EXPECT_EQ(3,person.x_ll);
EXPECT_EQ(6,person.y_ll);
EXPECT_EQ(6,person.x_lr);
EXPECT_EQ(6,person.y_lr);
}
#endif /*INSAGAME_TEST_PERSONNAGE_H*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment