Commit f742b89c authored by Pipelier Quentin's avatar Pipelier Quentin
Browse files

Ajout du test unitaire pour la durée

parent d906e4cf
Pipeline #195938 passed with stages
in 23 minutes and 16 seconds
#ifndef TEST_UNIT_H
#define TETS_UNIT_H
#include <cppunit>
class TestPlaylist : public Cpp::TestCase {
public:
void testDuration();
}
#endif //
#include "../header/test_unit.h"
#include "../header/playlist.h"
void TestPlaylist::testDuration(){
PGconn *retour_connexion = PQsetdbLogin("postgresql.bts-malraux72.net", "5432", nullptr, nullptr, "Cours", "q.pipelier", "Lilou1105");
Playlist *playlist = new Playlist(1, "Playlits_test", 2569, "", retour_connexion);
playlist->writeM3U("", "", "", "", "");
CPPUNIT_ASSERT(playlist.getDuration() <= 2569);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment