1st failed test

This commit is contained in:
devZoGok
2023-08-15 10:06:04 +03:00
parent c476e70444
commit 09ed7c34bc
3 changed files with 22 additions and 3 deletions
+11
View File
@@ -1 +1,12 @@
#include "luaFields.h"
namespace gameBase{
using namespace std;
string LuaTableField::toString(){
return "";
}
AbstractLuaField LuaTableField::operator[](string fieldName){
}
}
+3 -3
View File
@@ -9,13 +9,13 @@ namespace gameBase{
public:
std::string name = "";
protected:
AbstractLuaField();
std::string toString();
AbstractLuaField(std::string n) : name(n){}
virtual std::string toString(){return "";}
};
class LuaTableField : public AbstractLuaField{
public:
LuaTableField();
LuaTableField(std::string name) : AbstractLuaField(name){}
std::string toString();
AbstractLuaField operator[](std::string);
private:
+8
View File
@@ -1,6 +1,11 @@
#include "luaFieldsTest.h"
#include "luaFields.h"
#include <string>
namespace gameBase{
using namespace std;
void LuaFieldsTest::setUp(){
}
@@ -8,5 +13,8 @@ namespace gameBase{
}
void LuaFieldsTest::testTableToString(){
string toStringRes = "table = {a = 1, b = 2.2, c = true, d = \"false\", e = {x = 20, y = {}}}";
LuaTableField table("table");
CPPUNIT_ASSERT(table.toString() == toStringRes);
}
}