diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/test/llcontrol_tut.cpp | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/test/llcontrol_tut.cpp')
-rw-r--r-- | linden/indra/test/llcontrol_tut.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/linden/indra/test/llcontrol_tut.cpp b/linden/indra/test/llcontrol_tut.cpp index aabe205..cdf916e 100644 --- a/linden/indra/test/llcontrol_tut.cpp +++ b/linden/indra/test/llcontrol_tut.cpp | |||
@@ -44,8 +44,8 @@ namespace tut | |||
44 | struct control_group | 44 | struct control_group |
45 | { | 45 | { |
46 | LLControlGroup* mCG; | 46 | LLControlGroup* mCG; |
47 | LLString mTestConfigDir; | 47 | std::string mTestConfigDir; |
48 | LLString mTestConfigFile; | 48 | std::string mTestConfigFile; |
49 | static bool mListenerFired; | 49 | static bool mListenerFired; |
50 | control_group() | 50 | control_group() |
51 | { | 51 | { |
@@ -57,7 +57,7 @@ namespace tut | |||
57 | oStr << "/tmp/llcontrol-test-" << random << "/"; | 57 | oStr << "/tmp/llcontrol-test-" << random << "/"; |
58 | mTestConfigDir = oStr.str(); | 58 | mTestConfigDir = oStr.str(); |
59 | mTestConfigFile = mTestConfigDir + "settings.xml"; | 59 | mTestConfigFile = mTestConfigDir + "settings.xml"; |
60 | LLFile::mkdir(mTestConfigDir.c_str()); | 60 | LLFile::mkdir(mTestConfigDir); |
61 | LLSD config; | 61 | LLSD config; |
62 | config["TestSetting"]["Comment"] = "Dummy setting used for testing"; | 62 | config["TestSetting"]["Comment"] = "Dummy setting used for testing"; |
63 | config["TestSetting"]["Persist"] = 1; | 63 | config["TestSetting"]["Persist"] = 1; |
@@ -72,7 +72,7 @@ namespace tut | |||
72 | } | 72 | } |
73 | void writeSettingsFile(const LLSD& config) | 73 | void writeSettingsFile(const LLSD& config) |
74 | { | 74 | { |
75 | llofstream file(mTestConfigFile.c_str()); | 75 | llofstream file(mTestConfigFile); |
76 | if (file.is_open()) | 76 | if (file.is_open()) |
77 | { | 77 | { |
78 | LLSDSerialize::toPrettyXML(config, file); | 78 | LLSDSerialize::toPrettyXML(config, file); |
@@ -109,7 +109,7 @@ namespace tut | |||
109 | mCG->setU32("TestSetting", 13); | 109 | mCG->setU32("TestSetting", 13); |
110 | ensure_equals("value of changed setting", mCG->getU32("TestSetting"), 13); | 110 | ensure_equals("value of changed setting", mCG->getU32("TestSetting"), 13); |
111 | LLControlGroup test_cg; | 111 | LLControlGroup test_cg; |
112 | LLString temp_test_file = (mTestConfigDir + "setting_llsd_temp.xml"); | 112 | std::string temp_test_file = (mTestConfigDir + "setting_llsd_temp.xml"); |
113 | mCG->saveToFile(temp_test_file.c_str(), TRUE); | 113 | mCG->saveToFile(temp_test_file.c_str(), TRUE); |
114 | results = test_cg.loadFromFile(temp_test_file.c_str()); | 114 | results = test_cg.loadFromFile(temp_test_file.c_str()); |
115 | ensure("number of changed settings loaded", (results == 1)); | 115 | ensure("number of changed settings loaded", (results == 1)); |
@@ -126,7 +126,7 @@ namespace tut | |||
126 | control->setValue(new_value, FALSE); | 126 | control->setValue(new_value, FALSE); |
127 | ensure_equals("value of changed setting", mCG->getU32("TestSetting"), 13); | 127 | ensure_equals("value of changed setting", mCG->getU32("TestSetting"), 13); |
128 | LLControlGroup test_cg; | 128 | LLControlGroup test_cg; |
129 | LLString temp_test_file = (mTestConfigDir + "setting_llsd_persist_temp.xml"); | 129 | std::string temp_test_file = (mTestConfigDir + "setting_llsd_persist_temp.xml"); |
130 | mCG->saveToFile(temp_test_file.c_str(), TRUE); | 130 | mCG->saveToFile(temp_test_file.c_str(), TRUE); |
131 | results = test_cg.loadFromFile(temp_test_file.c_str()); | 131 | results = test_cg.loadFromFile(temp_test_file.c_str()); |
132 | //If we haven't changed any settings, then we shouldn't have any settings to load | 132 | //If we haven't changed any settings, then we shouldn't have any settings to load |