blob: 3ba0fad64a5d94759e8116d05ba8df8f94f141d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include "../profile.h"
#include <iostream>
#include <string>
using namespace std;
int main()
{
CProfile profile;
profile.InitCurrentDirectory(); // load colobot.ini file
string result;
profile.GetLocalProfileString("test_string", "string_value", result);
if (result != "Hello world") {
cout << "GetLocalProfileString failed!" << endl;
return 1;
}
int int_value;
profile.GetLocalProfileInt("test_int", "int_value", int_value);
if (int_value != 42) {
cout << "GetLocalProfileInt failed!" << endl;
return 1;
}
float float_value;
profile.GetLocalProfileFloat("test_float", "float_value", float_value);
if (float_value != 1.5) {
cout << "GetLocalProfileFloat failed!" << endl;
return 1;
}
return 0;
}
|