init commit

This commit is contained in:
2024-11-12 17:41:10 +01:00
parent 1e4f1f955b
commit 20bc9108d3
146 changed files with 24465 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
#include "inputCoucheTest.h"
void InputCoucheTest::setUp(){
// construction du test
Input2 = InputCouche(10);
Input1 = InputCouche(5,&Input2);
}
void InputCoucheTest::tearDown(){
// destruction du test
// delete Output;
// delete Input;
}
void InputCoucheTest::testActivate(){
vector<bool> v;
v.push_back(1);
v.push_back(0);
v.push_back(1);
v.push_back(1);
Input1.activate(v);
CPPUNIT_ASSERT( Input1[0].getWeight() == 1.0 );
CPPUNIT_ASSERT( Input1[1].getWeight() == 0.0 );
}
void InputCoucheTest::testGetChange(){
CPPUNIT_ASSERT( Input1.getChange(2,2) == 0.0 );
}
void InputCoucheTest::testActivateWrongSize(){
vector<bool> v(6);
Input1.activate(v);
}
void InputCoucheTest::testCopy(){
Input2[2] = 3.2;
Input1 = Input2;
CPPUNIT_ASSERT( Input1[2].getWeight() == 3.2 );
}