diff options
| author | Todd Stinson <stinson@lindenlab.com> | 2012-07-23 19:21:34 -0700 | 
|---|---|---|
| committer | Todd Stinson <stinson@lindenlab.com> | 2012-07-23 19:21:34 -0700 | 
| commit | 4feef5af63f6294249aa50e37fba712cd9ddec91 (patch) | |
| tree | d288ba7c65611f95762c20b6a7c244d7348bcec8 /indra/newview/tests | |
| parent | e7e0e514fdc3b522787e18fddee89b9f9fbbe834 (diff) | |
| parent | 364566924188c7aed5d391bf9a226fc4779ba020 (diff) | |
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-release.
Diffstat (limited to 'indra/newview/tests')
| -rw-r--r-- | indra/newview/tests/llagentaccess_test.cpp | 50 | 
1 files changed, 9 insertions, 41 deletions
| diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp index 564a49896c..3ba25f3c10 100644 --- a/indra/newview/tests/llagentaccess_test.cpp +++ b/indra/newview/tests/llagentaccess_test.cpp @@ -119,22 +119,6 @@ namespace tut  		ensure("1 isAdult",    !aa.isAdult());  #endif // HACKED_GODLIKE_VIEWER -		// this is kinda bad -- setting this forces maturity to MATURE but !teen != Mature anymore -		aa.setTeen(false); -#ifndef HACKED_GODLIKE_VIEWER -		ensure("2 isTeen",     !aa.isTeen()); -		ensure("2 isMature",   aa.isMature()); -		ensure("2 isAdult",    !aa.isAdult()); -#endif // HACKED_GODLIKE_VIEWER - -		// have to flip it back and make sure it still works -		aa.setTeen(true); -#ifndef HACKED_GODLIKE_VIEWER -		ensure("3 isTeen",     aa.isTeen()); -		ensure("3 isMature",   !aa.isMature()); -		ensure("3 isAdult",    !aa.isAdult());		 -#endif // HACKED_GODLIKE_VIEWER -  		// check the conversion routine  #ifndef HACKED_GODLIKE_VIEWER  		ensure_equals("1 conversion", SIM_ACCESS_PG, aa.convertTextToMaturity('P')); @@ -145,26 +129,26 @@ namespace tut  		// now try the other method of setting it - PG  		aa.setMaturity('P'); -		ensure("4 isTeen",     aa.isTeen()); +		ensure("2 isTeen",     aa.isTeen());  #ifndef HACKED_GODLIKE_VIEWER -		ensure("4 isMature",   !aa.isMature()); -		ensure("4 isAdult",    !aa.isAdult()); +		ensure("2 isMature",   !aa.isMature()); +		ensure("2 isAdult",    !aa.isAdult());  #endif // HACKED_GODLIKE_VIEWER  		// Mature  		aa.setMaturity('M');  #ifndef HACKED_GODLIKE_VIEWER -		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());  #endif // HACKED_GODLIKE_VIEWER  		// Adult  		aa.setMaturity('A');  #ifndef HACKED_GODLIKE_VIEWER -		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());  #endif // HACKED_GODLIKE_VIEWER  	} @@ -291,22 +275,6 @@ namespace tut  		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);  		LLAgentAccess aa(cgr); -#ifndef HACKED_GODLIKE_VIEWER -		ensure("1 transition starts false", !aa.isInTransition()); -#endif // HACKED_GODLIKE_VIEWER -		aa.setTransition(); -#ifndef HACKED_GODLIKE_VIEWER -		ensure("2 transition now true", aa.isInTransition()); -#endif // HACKED_GODLIKE_VIEWER -	} - -	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');  #ifndef HACKED_GODLIKE_VIEWER | 
