aboutsummaryrefslogtreecommitdiffstats
path: root/tests/configtest.cpp
blob: c6645eba2092842d59d1f403b4e4ac6aa468c88c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
#include <swconfig.h>

int main(int argc, char **argv) {
    SWConfig config("./test1.conf");
    config["Section1"]["Entry1"] = "Value1";
    config["Section1"]["Entry2"] = "oops";
    config["Section1"]["Entry2"] = "Value2";
    config.Save();
    SWConfig config2("./test1.conf");
    std::cout << "Should be Value2: " << config2["Section1"]["Entry2"] << std::endl;
    return 0;
}