Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request Feelzor#24 from FeelZoR/feature-tests
Browse files Browse the repository at this point in the history
feature-tests: correction test CPPUnit
  • Loading branch information
NilsKrattinger authored Nov 2, 2019
2 parents 60afed1 + da9da94 commit 89cc5ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ArbreAbstrait.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class NoeudInstEcrire : public Noeud {
~NoeudInstEcrire() {
} // A cause du destructeur virtuel de la classe Noeud
void accepter(Visiteur& visiteur) override;
virtual void ajoute(Noeud* instruction);
virtual void ajoute(Noeud* instruction) override;

inline vector<Noeud*> getEcritures() const { return m_ecritures; }

Expand Down
4 changes: 3 additions & 1 deletion tests/TestInstPour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "../Interpreteur.h"
#include "../TableSymboles.h"
#include "../Exceptions.h"
#include "../VisiteurExecuter.h"

CPPUNIT_TEST_SUITE_REGISTRATION(TestInstPour);

Expand All @@ -38,7 +39,8 @@ void TestInstPour::testPour() {

Interpreteur interpreteur(fichier);
interpreteur.analyse();
interpreteur.getArbre()->executer();
VisiteurExecuter visiteur;
interpreteur.getArbre()->accepter(visiteur);

const TableSymboles& table = interpreteur.getTable();
CPPUNIT_ASSERT_EQUAL_MESSAGE("Test valeur i", 11, table[3].getValeur());
Expand Down

0 comments on commit 89cc5ab

Please sign in to comment.