diff options
author | John Hurliman | 2009-11-05 13:10:58 -0800 |
---|---|---|
committer | John Hurliman | 2009-11-05 13:10:58 -0800 |
commit | afef1ac191d32e9c1514c294b17e404b1d4ae217 (patch) | |
tree | c390ef81c9c30922c2e95e32844832919884fd9c /OpenSim/Framework/Tests | |
parent | Applying #4332, optional packet statistics logging (diff) | |
download | opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.zip opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.gz opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.bz2 opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.xz |
Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen
Diffstat (limited to 'OpenSim/Framework/Tests')
-rw-r--r-- | OpenSim/Framework/Tests/AssetBaseTest.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/OpenSim/Framework/Tests/AssetBaseTest.cs b/OpenSim/Framework/Tests/AssetBaseTest.cs index 3dc6b4e..18a3e01 100644 --- a/OpenSim/Framework/Tests/AssetBaseTest.cs +++ b/OpenSim/Framework/Tests/AssetBaseTest.cs | |||
@@ -67,8 +67,7 @@ namespace OpenSim.Framework.Tests | |||
67 | 67 | ||
68 | private void CheckContainsReferences(AssetType assetType, bool expected) | 68 | private void CheckContainsReferences(AssetType assetType, bool expected) |
69 | { | 69 | { |
70 | AssetBase asset = new AssetBase(); | 70 | AssetBase asset = new AssetBase(UUID.Zero, String.Empty, (sbyte)assetType); |
71 | asset.Type = (sbyte)assetType; | ||
72 | bool actual = asset.ContainsReferences; | 71 | bool actual = asset.ContainsReferences; |
73 | Assert.AreEqual(expected, actual, "Expected "+assetType+".ContainsReferences to be "+expected+" but was "+actual+"."); | 72 | Assert.AreEqual(expected, actual, "Expected "+assetType+".ContainsReferences to be "+expected+" but was "+actual+"."); |
74 | } | 73 | } |