summaryrefslogtreecommitdiff
path: root/indra/newview/tests/llagentaccess_test.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-06-21 14:19:25 -0400
committerOz Linden <oz@lindenlab.com>2012-06-21 14:19:25 -0400
commitf64a79d9d14fe52dc9ac599bc9e4faf8009254ce (patch)
treed14ff8f9cf8bd723b8d479446f47eeb4211e8326 /indra/newview/tests/llagentaccess_test.cpp
parentee130adc60dea8530f82d90107198ebcbd63fded (diff)
parent4539e5c8e93badc83e71045ba87ef81bf8740cab (diff)
merge changes for DRTVWR-171
Diffstat (limited to 'indra/newview/tests/llagentaccess_test.cpp')
-rw-r--r--indra/newview/tests/llagentaccess_test.cpp42
1 files changed, 9 insertions, 33 deletions
diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp
index c970d79975..0141a219c5 100644
--- a/indra/newview/tests/llagentaccess_test.cpp
+++ b/indra/newview/tests/llagentaccess_test.cpp
@@ -111,18 +111,6 @@ namespace tut
ensure("1 isMature", !aa.isMature());
ensure("1 isAdult", !aa.isAdult());
- // this is kinda bad -- setting this forces maturity to MATURE but !teen != Mature anymore
- aa.setTeen(false);
- ensure("2 isTeen", !aa.isTeen());
- ensure("2 isMature", aa.isMature());
- ensure("2 isAdult", !aa.isAdult());
-
- // have to flip it back and make sure it still works
- aa.setTeen(true);
- ensure("3 isTeen", aa.isTeen());
- ensure("3 isMature", !aa.isMature());
- ensure("3 isAdult", !aa.isAdult());
-
// check the conversion routine
ensure_equals("1 conversion", SIM_ACCESS_PG, aa.convertTextToMaturity('P'));
ensure_equals("2 conversion", SIM_ACCESS_MATURE, aa.convertTextToMaturity('M'));
@@ -131,21 +119,21 @@ namespace tut
// now try the other method of setting it - PG
aa.setMaturity('P');
- ensure("4 isTeen", aa.isTeen());
- ensure("4 isMature", !aa.isMature());
- ensure("4 isAdult", !aa.isAdult());
+ ensure("2 isTeen", aa.isTeen());
+ ensure("2 isMature", !aa.isMature());
+ ensure("2 isAdult", !aa.isAdult());
// Mature
aa.setMaturity('M');
- ensure("5 isTeen", !aa.isTeen());
- ensure("5 isMature", aa.isMature());
- ensure("5 isAdult", !aa.isAdult());
+ ensure("3 isTeen", !aa.isTeen());
+ ensure("3 isMature", aa.isMature());
+ ensure("3 isAdult", !aa.isAdult());
// Adult
aa.setMaturity('A');
- ensure("6 isTeen", !aa.isTeen());
- ensure("6 isMature", aa.isMature());
- ensure("6 isAdult", aa.isAdult());
+ ensure("4 isTeen", !aa.isTeen());
+ ensure("4 isMature", aa.isMature());
+ ensure("4 isAdult", aa.isAdult());
}
@@ -239,18 +227,6 @@ namespace tut
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
LLAgentAccess aa(cgr);
- ensure("1 transition starts false", !aa.isInTransition());
- aa.setTransition();
- ensure("2 transition now true", aa.isInTransition());
- }
-
- template<> template<>
- void agentaccess_object_t::test<6>()
- {
- LLControlGroup cgr("test");
- cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
- LLAgentAccess aa(cgr);
-
cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);
aa.setMaturity('M');
ensure("1 preferred maturity pegged to M when maturity is M", cgr.getU32("PreferredMaturity") == SIM_ACCESS_MATURE);