diff options
author | Homer Horwitz | 2008-11-02 13:07:57 +0000 |
---|---|---|
committer | Homer Horwitz | 2008-11-02 13:07:57 +0000 |
commit | 499f1428f707cbb116349dc0a2f07a19658df668 (patch) | |
tree | 516cd76203c030773b0bc9bf3cd86e5581b09a46 /OpenSim/Framework/Tests | |
parent | Cause inventory to be fetched on scripted item gives if the destination (diff) | |
download | opensim-SC-499f1428f707cbb116349dc0a2f07a19658df668.zip opensim-SC-499f1428f707cbb116349dc0a2f07a19658df668.tar.gz opensim-SC-499f1428f707cbb116349dc0a2f07a19658df668.tar.bz2 opensim-SC-499f1428f707cbb116349dc0a2f07a19658df668.tar.xz |
- Add Util.isUUID
- Add tests for Util.isUUID
- First part of the fix for protocol interoperability between viewer 1.20 and 1.21 for friend offers.
Diffstat (limited to 'OpenSim/Framework/Tests')
-rw-r--r-- | OpenSim/Framework/Tests/UtilTest.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs index a973ed2..0224356 100644 --- a/OpenSim/Framework/Tests/UtilTest.cs +++ b/OpenSim/Framework/Tests/UtilTest.cs | |||
@@ -137,5 +137,20 @@ namespace OpenSim.Framework.Tests | |||
137 | "Normalized vector generated from vector does not have magnitude of 1."); | 137 | "Normalized vector generated from vector does not have magnitude of 1."); |
138 | } | 138 | } |
139 | } | 139 | } |
140 | |||
141 | [Test] | ||
142 | public void UUIDTests() | ||
143 | { | ||
144 | Assert.IsTrue(Util.isUUID("01234567-89ab-Cdef-0123-456789AbCdEf"), | ||
145 | "A correct UUID wasn't recognized."); | ||
146 | Assert.IsFalse(Util.isUUID("FOOBAR67-89ab-Cdef-0123-456789AbCdEf"), | ||
147 | "UUIDs with non-hex characters are recognized as correct UUIDs."); | ||
148 | Assert.IsFalse(Util.isUUID("01234567"), | ||
149 | "Too short UUIDs are regognized as correct UUIDs."); | ||
150 | Assert.IsFalse(Util.isUUID("01234567-89ab-Cdef-0123-456789AbCdEf0"), | ||
151 | "Too long UUIDs are regognized as correct UUIDs."); | ||
152 | Assert.IsFalse(Util.isUUID("01234567-89ab-Cdef-0123+456789AbCdEf"), | ||
153 | "UUIDs with wrong format are recognized as correct UUIDs."); | ||
154 | } | ||
140 | } | 155 | } |
141 | } | 156 | } |