aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/test/llmessageconfig_tut.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/test/llmessageconfig_tut.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/linden/indra/test/llmessageconfig_tut.cpp b/linden/indra/test/llmessageconfig_tut.cpp
index b709bfc..e5dd328 100644
--- a/linden/indra/test/llmessageconfig_tut.cpp
+++ b/linden/indra/test/llmessageconfig_tut.cpp
@@ -35,7 +35,6 @@
35#include "lltut.h" 35#include "lltut.h"
36#include "llsdserialize.h" 36#include "llsdserialize.h"
37#include "llfile.h" 37#include "llfile.h"
38#include "lldir.h"
39#include "lltimer.h" 38#include "lltimer.h"
40#include "llframetimer.h" 39#include "llframetimer.h"
41#include "llsdutil.h" 40#include "llsdutil.h"
@@ -51,7 +50,11 @@ namespace tut
51 random.generate(); 50 random.generate();
52 // generate temp dir 51 // generate temp dir
53 std::ostringstream oStr; 52 std::ostringstream oStr;
53#if LL_WINDOWS
54 oStr << "llmessage-config-test-" << random;
55#else
54 oStr << "/tmp/llmessage-config-test-" << random; 56 oStr << "/tmp/llmessage-config-test-" << random;
57#endif
55 mTestConfigDir = oStr.str(); 58 mTestConfigDir = oStr.str();
56 LLFile::mkdir(mTestConfigDir.c_str()); 59 LLFile::mkdir(mTestConfigDir.c_str());
57 writeConfigFile(LLSD()); 60 writeConfigFile(LLSD());
@@ -199,4 +202,23 @@ namespace tut
199 LLMessageConfig::getServerDefaultFlavor(), 202 LLMessageConfig::getServerDefaultFlavor(),
200 LLMessageConfig::LLSD_FLAVOR); 203 LLMessageConfig::LLSD_FLAVOR);
201 } 204 }
205
206 template<> template<>
207 void LLMessageConfigTestObject::test<8>()
208 // tests that config changes are picked up/refreshed periodically
209 {
210 LLSD config;
211 config["serverDefaults"]["simulator"] = "template";
212 config["messages"]["msg1"]["flavor"] = "llsd";
213 config["messages"]["msg1"]["only-send-latest"] = true;
214 config["messages"]["msg2"]["flavor"] = "llsd";
215 config["messages"]["msg2"]["only-send-latest"] = false;
216 LLMessageConfig::useConfig(config);
217 ensure_equals("Ensure msg1 exists, sent latest-only",
218 LLMessageConfig::onlySendLatest("msg1"),
219 true);
220 ensure_equals("Ensure msg2 exists, sent latest-only",
221 LLMessageConfig::onlySendLatest("msg2"),
222 false);
223 }
202} 224}