From 5e271e550dbb88f0bbea5f46aad9f0fd1d750eb3 Mon Sep 17 00:00:00 2001 From: erihel Date: Sun, 12 Aug 2012 15:00:37 +0200 Subject: * New CPluginManager class for managing plugins based on colobot.ini * Moved sound plugin into sound dir * Minor changes in logger and profile --- src/common/test/CMakeLists.txt | 2 +- src/common/test/colobot.ini | 7 +++++++ src/common/test/profile_test.cpp | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src/common/test') diff --git a/src/common/test/CMakeLists.txt b/src/common/test/CMakeLists.txt index 3adca4e..d81acab 100644 --- a/src/common/test/CMakeLists.txt +++ b/src/common/test/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -O0 -std=c++11") include_directories("../../") include_directories("../../../") -#add_executable(image_test ../image.cpp image_test.cpp) +add_executable(image_test ../image.cpp image_test.cpp) add_executable(profile_test ../profile.cpp profile_test.cpp) add_test(profile_test ./profile_test) diff --git a/src/common/test/colobot.ini b/src/common/test/colobot.ini index c4d2162..f6a5f96 100644 --- a/src/common/test/colobot.ini +++ b/src/common/test/colobot.ini @@ -6,3 +6,10 @@ string_value=Hello world [test_int] int_value=42 + +[test_multi] +entry=1 +entry=2 +entry=3 +entry=4 +entry=5 diff --git a/src/common/test/profile_test.cpp b/src/common/test/profile_test.cpp index 3ba0fad..65e20c5 100644 --- a/src/common/test/profile_test.cpp +++ b/src/common/test/profile_test.cpp @@ -2,6 +2,7 @@ #include #include +#include using namespace std; @@ -31,5 +32,12 @@ int main() return 1; } + vector list; + list = profile.GetLocalProfileSection("test_multi", "entry"); + if (list.size() != 5) { + cout << "GetLocalProfileSection failed!" << endl; + return 1; + } + return 0; } -- cgit v1.2.3-1-g7c22