Commit Graph

70 Commits (51043746f30e944d1dc03e521e30caa08f42028d)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 51043746f3 refactor: consistently put all test classes in the OpenSim.Tests.Common package rather than some in OpenSim.Tests.Common.Mock
the separate mock package was not useful and was just another using line to always add
2014-10-08 21:09:25 +01:00
Justin Clark-Casey (justincc) de0ab04d00 Actually add the llRequestAgentData() test class for commit 530c86 2014-04-11 00:36:50 +01:00
Justin Clark-Casey (justincc) 6a279feb2f Only allow llBreakAllLinks() to work if script has received PERMISSION_CHANGE_LINKS
As per http://wiki.secondlife.com/wiki/LlBreakAllLinks
Same as existing llCreateLink() and llBreakLink()
2014-03-12 23:54:20 +00:00
Justin Clark-Casey (justincc) c9415fd763 If an avatar is sitting, send out position updates to clients for any change, not just those outside the usual tolerances.
This is to allow small adjustments of less than 0.05m in functions such as llSetPrimitiveLinkParams() to work
This is another fix for http://opensimulator.org/mantis/view.php?id=7044
Extends regression test for this case.
2014-03-05 00:38:38 +00:00
Justin Clark-Casey (justincc) 31de7b845f When positioning agent with PRIM_ROTATION in llSetLinkPrimitiveParams(), set the global rotation rather than the local rotation
Functionally the same as the patch in http://opensimulator.org/mantis/view.php?id=7044, thanks Aleric.
This commit also extends the regression test
2014-03-03 23:35:21 +00:00
Justin Clark-Casey (justincc) ce5d308d23 Add some regression tests for previous commit 0e23374 2014-02-26 23:13:56 +00:00
Justin Clark-Casey (justincc) 51da52f904 Extend TestLlGetNotecardLine() regression test to contain chars that are two bytes in utf8 2013-12-14 02:48:29 +00:00
Justin Clark-Casey (justincc) f99dae03cb Fix bug where using PRIM_LINK_TARGET with only two remaining list items (e.g. link number then PRIM_ROTATION) would not return the parameter
Extended regression test for this case
2013-09-16 23:00:40 +01:00
Justin Clark-Casey (justincc) 60cf42cb8d Make llGetLinkPrimitiveParams() abort and return existing list of params when it encounters an invalid link number, rather than throwing an exception
Addresses http://opensimulator.org/mantis/view.php?id=6768
Thanks to talun for the patch on that commit - in the end I took a different approach that also deals with invalid PRIM_LINK_TARGET
However, not yet generating the same warning on invalid PRIM_LINK_TARGET as seen on LL grid
This commit also adds regression tests for some cases of llGetLinkPrimitiveParams()
2013-09-16 22:56:08 +01:00
Justin Clark-Casey (justincc) a08f01fa83 Fix NPC regression test failures.
These were genuine failures caused by ScenePresence.CompleteMovement() waiting for an UpdateAgent from NPC introduction that would never come.
Instead, we do not wait if the agent is an NPC.
2013-07-26 18:43:15 +01:00
Justin Clark-Casey (justincc) be686f80a3 minor: Remove mono compiler warnings from LSL_ApiHttpTests 2013-03-11 23:01:07 +00:00
Justin Clark-Casey (justincc) 14684116f8 Add regression tests for llGetNotecardLine() 2013-02-28 20:57:03 +00:00
Justin Clark-Casey (justincc) 61ba02e95f minor: remove some mono compiler warnings in script regression tests 2013-02-27 20:38:10 +00:00
Justin Clark-Casey (justincc) 59bd099b03 Add regression test for llReleaseUrl() (and for llRequestUrl)
Forgot to add file for llRequestUrl() test in commit b8a7c8b
2013-02-27 20:12:58 +00:00
Justin Clark-Casey (justincc) 0963ece25b Implement co-operative script termination if termination comes during a script wait event (llSleep(), etc.)
This makes use of EventWaitHandles since various web references indicate that Thread.Interrupt() can also cause runtime instability.
If co-op termination is enabled, then termination sets the wait handle instead of waiting for a timeout before possibly aborting the thread.
This allows the script to cleanly terminate if it's in a llSleep/LL function delay or the next time it enters such a wait without any timeout period.
Co-op termination is not yet testable since checking for termination request within loops that never trigger a wait is not yet implemented.
This commit, unlike 1b5c41c, passes the wait handle as an extra parameter through IScript.Initialize() instead of passing IScriptInstance itself.
2013-01-16 02:07:43 +00:00
Justin Clark-Casey (justincc) fccb03227e Instead of passing separate engine, part and item components to script APIs, pass down IScriptInstance instead.
This is to allow the future co-operative script thread terminate feature to detect and act upon termination requests.
This splits the assembly and state loading out from the ScriptInstance() constructor to a separate Load() method
in order to facilititate continued script logic regression testing.
2013-01-15 21:13:22 +00:00
Justin Clark-Casey (justincc) 66982c8a59 Remove some mono warnings in script tests, chiefly where SetUp() wasn't properly calling to OpenSimTestCase.SetUp() 2012-12-05 23:36:15 +00:00
Justin Clark-Casey (justincc) 22d4c52ffc Consistenly make NUnit test cases inherit from OpenSimTestCase which automatically turns off any logging enabled between tests 2012-11-24 03:15:24 +00:00
Justin Clark-Casey (justincc) 8af8319b95 Get osNpcCreate() and osNpcLoadAppearance() to generate a script error if appearance notecard does not exist, rather than returning UUID.Zero or silently failing. 2012-10-25 03:02:00 +01:00
Justin Clark-Casey (justincc) ae662b54ea Make osNpcCreate() return UUID.Zero instead of throwing an exception if notecard name is invalid. Make osNpcLoadAppearance() fail silently in same circumstance rather than throwing exception. 2012-10-25 01:07:06 +01:00
Justin Clark-Casey (justincc) 5d4ac5a90f Add TestOsNpcLoadAppearance() 2012-10-25 00:59:27 +01:00
Justin Clark-Casey (justincc) 1743fe5d62 Move npc creation tests involving appearance from OSSL_ApiAppearanceTest to OSSL_ApiNpcTests
This is a more intuitive location.
2012-10-25 00:29:50 +01:00
Justin Clark-Casey (justincc) 5df3944607 Fix llListFindList() returning no match when there is a match with a script constant component in the source list.
Adds regression test for this case.
Based on http://opensimulator.org/mantis/view.php?id=6156
Thanks SignpostMarv.
2012-09-22 00:23:25 +01:00
Justin Clark-Casey (justincc) 9f01c3d408 Disable logging in regression test in OSSL_ApiAttachmentTests 2012-07-10 23:04:44 +01:00
Justin Clark-Casey (justincc) c8af20f966 This script allows an object to be attached directly from prim inventory to another avatar in the scene.
Very useful in serious game/environment scenarios where its only allowed for trusted creators.
Threat level Severe
2012-07-09 23:08:41 +01:00
Justin Clark-Casey (justincc) 16d5b79d57 minor: remove some recent mono compiler warnings 2012-07-07 00:36:01 +01:00
Justin Clark-Casey (justincc) 7ff4eec79c Remove redundant SetScene() function in Scene.AddSceneObject()
This is always done later on in SceneGraph.AddSceneObject() if the call hasn't failed due to sanity checks.
There's no other purpose for this method to exist and it's dangerous/pointless to call in other conditions.
2012-07-07 00:02:45 +01:00
Justin Clark-Casey (justincc) 951b45b80f Add OSSL function osForceAttachToAvatarFromInventory()
This works like osForceAttachToAvatar() but allows an object to be directly specified from the script object's inventory rather than forcing it to be rezzed in the scene first.
Still only attaches objects to the owner of the script.
This allows one to bypass the complicated co-ordination of first rezzing objects in the scene before attaching them.
Threat level high.
2012-07-05 00:05:06 +01:00
Justin Clark-Casey (justincc) ef279c5a62 Add automated TestllBreakLink() 2012-05-08 23:36:23 +01:00
Justin Clark-Casey (justincc) c0658a102e Add automated TestllCreateLink() 2012-05-08 23:29:51 +01:00
Justin Clark-Casey (justincc) 6406d5a5b9 refactor: Eliminate local id parameter from api initialize.
This is always available from m_host.LocalId
2012-05-08 23:20:27 +01:00
Justin Clark-Casey (justincc) 01b78235db Instead of constantly looking up unchanging self item in script code, pass in self item on initialization. 2012-05-08 23:05:01 +01:00
Justin Clark-Casey (justincc) 07e62df558 Add regression test for teleporting an agent between separated regions on the same simulator.
This involves a large amount of change in test scene setup code to allow test scenes to share shared modules
SetupScene is now an instance method that requires an instantiation of SceneHelpers, though other SceneHelpers methods are still static
May split these out into separate classes in the future.
2012-04-27 00:58:54 +01:00
Justin Clark-Casey (justincc) 760010d6fb Fix llGiveInventory() so that it checks the destination part for AllowInventoryDrop, not the source.
This allows llAllowInventoryDrop() to work.
Regression test added for this case.
2012-03-22 22:33:37 +00:00
Justin Clark-Casey (justincc) c4b2d24f33 Add llGiveInventory() test from object to object where both objects are owned by the same user. 2012-03-22 22:17:07 +00:00
Justin Clark-Casey (justincc) a92153ed88 Get all test methods in OpenSim.Region.ScriptEngine.Tests.dll to report that they're running 2012-03-06 02:21:19 +00:00
Justin Clark-Casey (justincc) 47377f17c6 Add missing assert to confirm owner delete succeeded to the end of TestOsNpcRemoveOwned() 2012-01-12 23:46:43 +00:00
Justin Clark-Casey (justincc) beab155434 Add api level test for removing an owned npc 2012-01-12 22:35:11 +00:00
Justin Clark-Casey (justincc) caa207f59f Add ossl level test for removing an unowned npc 2012-01-12 21:03:54 +00:00
John Cochran ff5a83d192 Fixed llAngleBetween() to allow denormal rotations 2012-01-06 21:14:42 +00:00
Justin Clark-Casey (justincc) 8c445dac67 Add script instruction count back to llRot2Euler. Other minor formatting/doc changes. 2012-01-06 21:12:22 +00:00
John Cochran eb9bf71726 Replaced llRot2Euler function.
The original function suffered from unexpected results due to rounding
errors. An error of only 1 or 2 ulps would cause the code to not detect
a singularity at Y rotation +/- PI/2 and take the non-singularity code
path. The replacement code does not suffer from wildly inaccurate
results at the +/- PI/2 singularity. The check in the code for the
singularity isn't strictly needed, but gives more consistent results
At the singularity, the X and Z rotations add. The if check simply
forces the X rotation to be zero so the entirety of the X+Z rotation is
carried by Z.

Additionally, the test code has been updated to include test cases that
caused the old code to fail. The test algorithm is also updated to
perform a more meaningful test. The original code checked if the values
against expected values. This could fail at +/- PI rotations since a
rotation around an axis by PI causes the identical effect as a rotation
by -PI. The new test code checks that the returned angles can be used
to recreate a quaternion that causes the same rotation.
2012-01-06 21:08:54 +00:00
Micheil Merlin 28961dd1cf llSetPrimitiveParams Prim type params precision errors 2011-09-09 22:53:45 +01:00
Micheil Merlin cf42fcd978 llSetPrimitiveParams correct prim hollow for cases where limit should be 70%.
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-08-25 06:50:55 -04:00
Micheil Merlin b80dfb6572 llGetPrimitiveParams fix prim hollow/hole shape value 2011-08-13 15:34:08 +01:00
Justin Clark-Casey (justincc) 0a1bbc27d2 Allow the osNpcCreate() function to accept a notecard name or asset for initial appearance 2011-08-12 00:14:06 +01:00
Justin Clark-Casey (justincc) b1ae930c6b Implement osAgentSaveAppearance() to save the appearance of an avatar in the region to a notecard
This is separate from osOwnerSaveAppearance() so that owner saves can be allowed without allowing arbitrary avatar saves
2011-08-11 22:26:47 +01:00
Justin Clark-Casey (justincc) 50945dd560 add regression test for osNpcCreate when cloning an in-region avatar 2011-08-11 21:43:26 +01:00
Justin Clark-Casey (justincc) 83ca5a101d Split out to-be-common setup stuff from TestOsOwnerSaveAppearance() 2011-08-11 20:56:18 +01:00
Justin Clark-Casey (justincc) 795c8e6c22 Add osOwnerSaveAppearance() to help with setting up NPC appearances. Not yet ready for user use.
Adds regression test.
2011-08-09 22:05:47 +01:00