From 14684116f8ef23892b71ef16759224a536ac27bf Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 28 Feb 2013 20:57:03 +0000
Subject: Add regression tests for llGetNotecardLine()
---
OpenSim/Tests/Common/TestHelpers.cs | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
(limited to 'OpenSim/Tests/Common/TestHelpers.cs')
diff --git a/OpenSim/Tests/Common/TestHelpers.cs b/OpenSim/Tests/Common/TestHelpers.cs
index 57da802..a684d72 100644
--- a/OpenSim/Tests/Common/TestHelpers.cs
+++ b/OpenSim/Tests/Common/TestHelpers.cs
@@ -114,6 +114,27 @@ namespace OpenSim.Tests.Common
}
///
+ /// Parse a UUID stem into a full UUID.
+ ///
+ ///
+ /// Yes, this is completely inconsistent with ParseTail but this is probably a better way to do it,
+ /// UUIDs are conceptually not hexadecmial numbers.
+ /// The fragment will come at the start of the UUID. The rest will be 0s
+ ///
+ ///
+ ///
+ /// A UUID fragment that will be parsed into a full UUID. Therefore, it can only contain
+ /// cahracters which are valid in a UUID, except for "-" which is currently only allowed if a full UUID is
+ /// given as the 'fragment'.
+ ///
+ public static UUID ParseStem(string stem)
+ {
+ string rawUuid = stem.PadRight(32, '0');
+
+ return UUID.Parse(rawUuid);
+ }
+
+ ///
/// Parse tail section into full UUID.
///
///
--
cgit v1.1