You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
committed by
Jo Shields
parent
183bba2c9a
commit
6992685b86
@@ -5,8 +5,9 @@ include ../../build/rules.make
|
||||
# bet you can't say this ten times fast
|
||||
|
||||
LIBRARY = System.Runtime.Serialization.Formatters.Soap.dll
|
||||
LIB_MCS_FLAGS = /r:$(corlib) /r:System.Xml.dll
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
|
||||
LIB_REFS = System.Xml
|
||||
LIB_MCS_FLAGS = /r:$(corlib)
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -r:System.dll -nowarn:0618 -nowarn:219 -nowarn:169
|
||||
|
||||
EXTRA_DISTFILES = \
|
||||
README \
|
||||
|
||||
@@ -735,9 +735,10 @@ namespace System.Runtime.Serialization.Formatters.Soap {
|
||||
{
|
||||
if (parentObjectId == 0) indices = null;
|
||||
|
||||
if (!objectInstance.GetType().IsValueType || parentObjectId == 0)
|
||||
objMgr.RegisterObject (objectInstance, objectId, info, 0, null, null);
|
||||
else
|
||||
if (!objectInstance.GetType ().IsValueType || parentObjectId == 0) {
|
||||
if (objMgr.GetObject(objectId) != objectInstance)
|
||||
objMgr.RegisterObject (objectInstance, objectId, info, 0, null, null);
|
||||
} else
|
||||
{
|
||||
if(objMgr.GetObject(objectId) != null)
|
||||
throw new SerializationException("Object already registered");
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace SoapShared
|
||||
SerializeDeserialize(c.m_object);
|
||||
SerializeDeserialize(c.m_sbyte);
|
||||
SerializeDeserialize(c.m_short);
|
||||
SerializeDeserialize(c.m_time);
|
||||
//SerializeDeserialize(c.m_time);
|
||||
SerializeDeserialize(c.m_timeSpan);
|
||||
SerializeDeserialize(c.m_uint);
|
||||
SerializeDeserialize(c.m_ulong);
|
||||
@@ -87,6 +87,6 @@ namespace SoapShared
|
||||
public object m_object = new object();
|
||||
public TimeSpan m_timeSpan = TimeSpan.FromTicks(TimeSpan.TicksPerDay);
|
||||
public byte[] m_bytes = new byte[10];
|
||||
public DateTime m_time = DateTime.Now;
|
||||
//public DateTime m_time = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap
|
||||
bool _bool2;
|
||||
byte _byte;
|
||||
char _char;
|
||||
DateTime _dateTime;
|
||||
// DateTime _dateTime;
|
||||
decimal _decimal;
|
||||
double _double;
|
||||
short _short;
|
||||
@@ -476,7 +476,7 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap
|
||||
_bool2 = false;
|
||||
_byte = 254;
|
||||
_char = 'A';
|
||||
_dateTime = new DateTime (1972,7,13,1,20,59);
|
||||
// _dateTime = new DateTime (1972,7,13,1,20,59);
|
||||
_decimal = (decimal)101010.10101;
|
||||
_double = 123456.6789;
|
||||
_short = -19191;
|
||||
@@ -555,7 +555,7 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap
|
||||
SerializationTest.AssertEquals ("SomeValues._bool2", _bool2, obj._bool2);
|
||||
SerializationTest.AssertEquals ("SomeValues._byte", _byte, obj._byte);
|
||||
SerializationTest.AssertEquals ("SomeValues._char", _char, obj._char);
|
||||
SerializationTest.AssertEquals ("SomeValues._dateTime", _dateTime, obj._dateTime);
|
||||
// SerializationTest.AssertEquals ("SomeValues._dateTime", _dateTime, obj._dateTime);
|
||||
SerializationTest.AssertEquals ("SomeValues._decimal", _decimal, obj._decimal);
|
||||
SerializationTest.AssertEquals ("SomeValues._int", _int, obj._int);
|
||||
SerializationTest.AssertEquals ("SomeValues._long", _long, obj._long);
|
||||
|
||||
@@ -12,6 +12,7 @@ using System.Runtime.Serialization.Formatters.Soap;
|
||||
using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
||||
using System.IO;
|
||||
using NUnit.Framework;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
|
||||
|
||||
@@ -27,7 +28,7 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
|
||||
private string _string;
|
||||
private string[] _strings = new string[]{};
|
||||
private Queue _queue = new Queue();
|
||||
public Hashtable _table = new Hashtable();
|
||||
public Dictionary<object, object> _table = new Dictionary<object, object> ();
|
||||
|
||||
public string ObjString {
|
||||
get { return _string; }
|
||||
@@ -56,25 +57,12 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap {
|
||||
MoreComplexObject objReturn = obj as MoreComplexObject;
|
||||
if(objReturn == null) return false;
|
||||
if(objReturn._string != this._string) return false;
|
||||
IEnumerator myEnum = this._table.GetEnumerator();
|
||||
foreach(DictionaryEntry e in objReturn._table) {
|
||||
myEnum.MoveNext();
|
||||
DictionaryEntry s = (DictionaryEntry) myEnum.Current;
|
||||
Assertion.AssertEquals("#_table", s.Key, e.Key);
|
||||
Assertion.AssertEquals("#_table", s.Value, e.Value);
|
||||
if(s.Key.ToString() != e.Key.ToString() || s.Value.ToString() != e.Value.ToString()) return false;
|
||||
|
||||
Assert.AreEqual (_table.Count, objReturn._table.Count, "#1");
|
||||
foreach(var e in objReturn._table) {
|
||||
Assert.AreEqual (e.Value, _table[e.Key], e.Key.ToString ());
|
||||
}
|
||||
// Assertion.Assert("#_table is null", objReturn._table != null);
|
||||
// Console.WriteLine("_table[foo]: {0}", objReturn._table["foo"]);
|
||||
// Assertion.AssertEquals("#_table[\"foo\"]", "barr", objReturn._table["foo"]);
|
||||
// Console.WriteLine("_table[1]: {0}", objReturn._table[1]);
|
||||
// Assertion.AssertEquals("#_table[1]", "foo", objReturn._table[1]);
|
||||
// Console.WriteLine("_table['c']: {0}", objReturn._table['c']);
|
||||
// Assertion.AssertEquals("#_table['c']", "barr", objReturn._table['c']);
|
||||
// Console.WriteLine("_table[barr]: {0}", objReturn._table["barr"]);
|
||||
// Assertion.AssertEquals("#_table[\"barr\"]", 1234567890, objReturn._table["barr"]);
|
||||
return SoapFormatterTest.CheckArray(this._queue.ToArray(), objReturn._queue.ToArray());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user