diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-09-11 18:22:05 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-09-21 14:39:35 -0400 |
commit | 6bc4cad0eddd7a7cf593ca1471599e2d75727379 (patch) | |
tree | d05d5f039648d18f49fc0cf56132b2e9a5c88e09 /src/test.cpp | |
parent | 2ae5d3f3abc7ac5ee96c4dfc7eeead045fdc775e (diff) | |
download | minetest-6bc4cad0eddd7a7cf593ca1471599e2d75727379.tar.gz minetest-6bc4cad0eddd7a7cf593ca1471599e2d75727379.tar.bz2 minetest-6bc4cad0eddd7a7cf593ca1471599e2d75727379.zip |
Split settings into seperate source and header files
This also cleans up settings a bit
Diffstat (limited to 'src/test.cpp')
-rw-r--r-- | src/test.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/test.cpp b/src/test.cpp index 8a080454b..956397f26 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -390,12 +390,14 @@ struct TestSettings: public TestBase { Settings s; // Test reading of settings - s.parseConfigLine("leet = 1337"); - s.parseConfigLine("leetleet = 13371337"); - s.parseConfigLine("leetleet_neg = -13371337"); - s.parseConfigLine("floaty_thing = 1.1"); - s.parseConfigLine("stringy_thing = asd /( ¤%&(/\" BLÖÄRP"); - s.parseConfigLine("coord = (1, 2, 4.5)"); + std::istringstream is( + "leet = 1337\n" + "leetleet = 13371337\n" + "leetleet_neg = -13371337\n" + "floaty_thing = 1.1\n" + "stringy_thing = asd /( ¤%&(/\" BLÖÄRP\n" + "coord = (1, 2, 4.5)"); + s.parseConfigLines(is); UASSERT(s.getS32("leet") == 1337); UASSERT(s.getS16("leetleet") == 32767); UASSERT(s.getS16("leetleet_neg") == -32768); |