You've already forked linux-packaging-mono
Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
@@ -13,9 +13,6 @@ ifneq (2.1, $(FRAMEWORK_VERSION))
|
||||
LIB_MCS_FLAGS += -d:NET_3_5 -nowarn:1720
|
||||
endif
|
||||
|
||||
MOBILE_DYNAMIC := $(filter monodroid xammac mobile, $(PROFILE))
|
||||
MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime monotouch_watch, $(PROFILE))
|
||||
|
||||
ifdef MOBILE_DYNAMIC
|
||||
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR,FEATURE_REFEMIT
|
||||
endif
|
||||
|
@@ -100,8 +100,10 @@ partial class SR
|
||||
public const string Cryptography_UnknownEllipticCurve = "Cryptography_UnknownEllipticCurve";
|
||||
public const string Cryptography_UnknownEllipticCurveAlgorithm = "Cryptography_UnknownEllipticCurveAlgorithm";
|
||||
public const string Cryptography_UnknownPaddingMode = "Cryptography_UnknownPaddingMode";
|
||||
public const string Cryptography_HashAlgorithmNameNullOrEmpty = "Cryptography_HashAlgorithmNameNullOrEmpty";
|
||||
|
||||
public const string InvalidOperation_ViewIsNull = "InvalidOperation_ViewIsNull";
|
||||
public const string ObjectDisposed_ViewAccessorClosed = "ObjectDisposed_ViewAccessorClosed";
|
||||
public const string NotSupported_MMViewStreamsFixedLength = "NotSupported_MMViewStreamsFixedLength";
|
||||
public const string NotSupported_SubclassOverride = "NotSupported_SubclassOverride";
|
||||
}
|
||||
|
@@ -26,7 +26,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_4_0
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
@@ -411,5 +410,4 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -133,9 +133,6 @@ namespace MonoTests.System.Linq.Expressions {
|
||||
var p = Expression.Parameter (typeof (string), null);
|
||||
Assert.AreEqual (null, p.Name);
|
||||
Assert.AreEqual (typeof (string), p.Type);
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("<param>", p.ToString ());
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -144,9 +141,6 @@ namespace MonoTests.System.Linq.Expressions {
|
||||
var p = Expression.Parameter (typeof (string), "");
|
||||
Assert.AreEqual ("", p.Name);
|
||||
Assert.AreEqual (typeof (string), p.Type);
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("", p.ToString ());
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -199,9 +193,6 @@ namespace MonoTests.System.Linq.Expressions {
|
||||
|
||||
Assert.AreEqual (typeof (Func<string, string>), identity.GetType ());
|
||||
Assert.IsNotNull (identity.Target);
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual (typeof (ExecutionScope), identity.Target.GetType ());
|
||||
#endif
|
||||
}
|
||||
|
||||
class Foo {
|
||||
@@ -217,39 +208,6 @@ namespace MonoTests.System.Linq.Expressions {
|
||||
}
|
||||
}
|
||||
|
||||
#if !NET_4_0
|
||||
[Test]
|
||||
public void GlobalsInScope ()
|
||||
{
|
||||
var foo = new Foo { gazonk = "gazonk" };
|
||||
var bar = new Bar { baz = 42 };
|
||||
|
||||
var l = Expression.Lambda<Func<string>> (
|
||||
Expression.Call (
|
||||
typeof (string).GetMethod ("Concat", new [] { typeof (string), typeof (string) }),
|
||||
Expression.Field (Expression.Constant (foo), typeof (Foo).GetField ("gazonk")),
|
||||
Expression.Call (Expression.Constant (bar), typeof (Bar).GetMethod ("ToString"))));
|
||||
|
||||
var del = l.Compile ();
|
||||
|
||||
var scope = del.Target as ExecutionScope;
|
||||
|
||||
Assert.IsNotNull (scope);
|
||||
|
||||
var globals = scope.Globals;
|
||||
|
||||
Assert.IsNotNull (globals);
|
||||
|
||||
Assert.AreEqual (2, globals.Length);
|
||||
Assert.AreEqual (typeof (StrongBox<Foo>), globals [0].GetType ());
|
||||
Assert.AreEqual (typeof (StrongBox<Bar>), globals [1].GetType ());
|
||||
|
||||
Assert.AreEqual (foo, ((StrongBox<Foo>) globals [0]).Value);
|
||||
Assert.AreEqual (bar, ((StrongBox<Bar>) globals [1]).Value);
|
||||
|
||||
Assert.AreEqual ("gazonk42", del ());
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void SimpleHoistedParameter ()
|
||||
|
@@ -194,12 +194,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
// These are invalid:
|
||||
InvalidOperation<byte> (Byte.MaxValue, 2);
|
||||
InvalidOperation<sbyte> (SByte.MaxValue, 2);
|
||||
#if !NET_4_0
|
||||
// Stuff that just fits in 32 bits, does not overflow:
|
||||
MustNotOverflow<short> (Int16.MaxValue, 2);
|
||||
MustNotOverflow<short> (Int16.MaxValue, 2);
|
||||
MustNotOverflow<ushort> (UInt16.MaxValue, 2);
|
||||
#endif
|
||||
// Doubles, floats, do not overflow
|
||||
MustNotOverflow<float> (Single.MaxValue, 1);
|
||||
MustNotOverflow<double> (Double.MaxValue, 1);
|
||||
|
@@ -80,9 +80,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
Assert.AreEqual (ExpressionType.AndAlso, expr.NodeType, "AndAlso#01");
|
||||
Assert.AreEqual (typeof (bool), expr.Type, "AndAlso#02");
|
||||
Assert.IsNull (expr.Method, "AndAlso#03");
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("(True && False)", expr.ToString(), "AndAlso#04");
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -97,10 +94,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
Assert.AreEqual (typeof (OpClass), expr.Type, "AndAlso#06");
|
||||
Assert.AreEqual (mi, expr.Method, "AndAlso#07");
|
||||
Assert.AreEqual ("op_BitwiseAnd", expr.Method.Name, "AndAlso#08");
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) && value(MonoTests.System.Linq.Expressions.OpClass))",
|
||||
expr.ToString(), "AndAlso#09");
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@@ -87,11 +87,7 @@ namespace MonoTests.System.Linq.Expressions {
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if NET_4_0
|
||||
[ExpectedException (typeof (ArgumentException))]
|
||||
#else
|
||||
[ExpectedException (typeof (ArgumentNullException))]
|
||||
#endif
|
||||
public void ArgInstanceNullForNonStaticMethod ()
|
||||
{
|
||||
Expression.Call (null, typeof (object).GetMethod ("ToString"));
|
||||
@@ -303,18 +299,6 @@ namespace MonoTests.System.Linq.Expressions {
|
||||
{
|
||||
return (int) (i as ConstantExpression).Value;
|
||||
}
|
||||
#if !NET_4_0 // dlr bug 5875
|
||||
[Test]
|
||||
public void CallMethodWithExpressionParameter ()
|
||||
{
|
||||
var call = Expression.Call (GetType ().GetMethod ("Bang"), Expression.Constant (42));
|
||||
Assert.AreEqual (ExpressionType.Quote, call.Arguments [0].NodeType);
|
||||
|
||||
var l = Expression.Lambda<Func<int>> (call).Compile ();
|
||||
|
||||
Assert.AreEqual (42, l ());
|
||||
}
|
||||
#endif
|
||||
static bool fout_called = false;
|
||||
|
||||
public static int FooOut (out int x)
|
||||
|
@@ -81,16 +81,10 @@ namespace MonoTests.System.Linq.Expressions {
|
||||
|
||||
var conv = Expression.Convert (p, typeof (ITzap));
|
||||
Assert.AreEqual (typeof (ITzap), conv.Type);
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("Convert(<param>)", conv.ToString ());
|
||||
#endif
|
||||
p = Expression.Parameter (typeof (ITzap), null);
|
||||
conv = Expression.Convert (p, typeof (IFoo));
|
||||
|
||||
Assert.AreEqual (typeof (IFoo), conv.Type);
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("Convert(<param>)", conv.ToString ());
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@@ -76,9 +76,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
Assert.AreEqual (ExpressionType.Equal, expr.NodeType);
|
||||
Assert.AreEqual (typeof (bool), expr.Type);
|
||||
Assert.IsNull (expr.Method);
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("(1 = 2)", expr.ToString ());
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -119,9 +116,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
Assert.AreEqual (true, expr.IsLifted);
|
||||
Assert.AreEqual (false, expr.IsLiftedToNull);
|
||||
Assert.IsNull (expr.Method);
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("(1 = 2)", expr.ToString ());
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -138,9 +132,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
Assert.AreEqual (true, expr.IsLifted);
|
||||
Assert.AreEqual (true, expr.IsLiftedToNull);
|
||||
Assert.IsNull (expr.Method);
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("(1 = 2)", expr.ToString ());
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -166,9 +157,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
Assert.AreEqual (typeof (bool), expr.Type);
|
||||
Assert.AreEqual (mi, expr.Method);
|
||||
Assert.AreEqual ("op_Equality", expr.Method.Name);
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) = value(MonoTests.System.Linq.Expressions.OpClass))", expr.ToString ());
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@@ -267,19 +267,5 @@ namespace MonoTests.System.Linq.Expressions
|
||||
|
||||
Assert.AreEqual (5, l (1));
|
||||
}
|
||||
#if !NET_4_0 // dlr bug 5875
|
||||
[Test]
|
||||
public void LambdaReturningExpression ()
|
||||
{
|
||||
var l = Expression.Lambda<Func<Expression>> (Expression.Constant (42));
|
||||
Assert.AreEqual (ExpressionType.Quote, l.Body.NodeType);
|
||||
|
||||
var quoter = l.Compile ();
|
||||
|
||||
var q = quoter ();
|
||||
|
||||
Assert.AreEqual (ExpressionType.Constant, q.NodeType);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -277,6 +277,10 @@ namespace MonoTests.System.Linq.Expressions
|
||||
[Test]
|
||||
public void NegateDecimal ()
|
||||
{
|
||||
// Make sure the negate method is not linked away
|
||||
decimal d1 = 1;
|
||||
decimal d2 = -d1;
|
||||
|
||||
var d = Expression.Parameter (typeof (decimal), "l");
|
||||
|
||||
var meth = typeof (decimal).GetMethod ("op_UnaryNegation", new [] { typeof (decimal) });
|
||||
|
@@ -80,9 +80,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
Assert.AreEqual (ExpressionType.OrElse, expr.NodeType, "OrElse#01");
|
||||
Assert.AreEqual (typeof (bool), expr.Type, "OrElse#02");
|
||||
Assert.IsNull (expr.Method, "OrElse#03");
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("(True || False)", expr.ToString(), "OrElse#04");
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -97,10 +94,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
Assert.AreEqual (typeof (OpClass), expr.Type, "OrElse#06");
|
||||
Assert.AreEqual (mi, expr.Method, "OrElse#07");
|
||||
Assert.AreEqual ("op_BitwiseOr", expr.Method.Name, "OrElse#08");
|
||||
#if !NET_4_0
|
||||
Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) || value(MonoTests.System.Linq.Expressions.OpClass))",
|
||||
expr.ToString(), "OrElse#09");
|
||||
#endif
|
||||
}
|
||||
|
||||
public class BrokenMethod {
|
||||
@@ -283,29 +276,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
Assert.AreEqual (new Slot (64), orelse (new Slot (64), new Slot (64)));
|
||||
Assert.AreEqual (new Slot (32), orelse (new Slot (32), new Slot (64)));
|
||||
}
|
||||
#if !NET_4_0 // dlr bug 5867
|
||||
[Test]
|
||||
public void UserDefinedOrElseLiftedToNull ()
|
||||
{
|
||||
var l = Expression.Parameter (typeof (Slot?), "l");
|
||||
var r = Expression.Parameter (typeof (Slot?), "r");
|
||||
|
||||
var method = typeof (Slot).GetMethod ("op_BitwiseOr");
|
||||
|
||||
var node = Expression.OrElse (l, r, method);
|
||||
Assert.IsTrue (node.IsLifted);
|
||||
Assert.IsTrue (node.IsLiftedToNull);
|
||||
Assert.AreEqual (method, node.Method);
|
||||
|
||||
var orelse = Expression.Lambda<Func<Slot?, Slot?, Slot?>> (node, l, r).Compile ();
|
||||
|
||||
Assert.AreEqual (new Slot (64), orelse (new Slot (64), new Slot (64)));
|
||||
Assert.AreEqual (new Slot (32), orelse (new Slot (32), new Slot (64)));
|
||||
Assert.AreEqual (new Slot (64), orelse (null, new Slot (64)));
|
||||
Assert.AreEqual (new Slot (32), orelse (new Slot (32), null));
|
||||
Assert.AreEqual (null, orelse (null, null));
|
||||
}
|
||||
#endif
|
||||
[Test]
|
||||
[Category ("NotWorkingInterpreter")]
|
||||
public void UserDefinedOrElseShortCircuit ()
|
||||
|
@@ -37,23 +37,12 @@ namespace MonoTests.System.Linq.Expressions
|
||||
Expression.Quote (null);
|
||||
}
|
||||
|
||||
#if !NET_4_0
|
||||
[Test]
|
||||
public void QuoteConstant ()
|
||||
{
|
||||
UnaryExpression expr = Expression.Quote (Expression.Constant (1));
|
||||
Assert.AreEqual (ExpressionType.Quote, expr.NodeType, "Quote#01");
|
||||
Assert.AreEqual (typeof (ConstantExpression), expr.Type, "Quote#02");
|
||||
Assert.AreEqual ("1", expr.ToString(), "Quote#03");
|
||||
}
|
||||
#else
|
||||
[Test]
|
||||
[ExpectedException (typeof (ArgumentException))]
|
||||
public void QuoteConstant ()
|
||||
{
|
||||
Expression.Quote (Expression.Constant (1));
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void CompiledQuote ()
|
||||
|
@@ -184,15 +184,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
MustOverflow<uint> (0, 1);
|
||||
}
|
||||
|
||||
#if !NET_4_0 // fixed in net_4_0
|
||||
[Test]
|
||||
public void TestBugCompatibility ()
|
||||
{
|
||||
// This one does not overflow on .NET (!!!)
|
||||
// Sounds very odd, should file a bug with MS.
|
||||
MustNotOverflow<short> (Int16.MinValue, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// These should not overflow
|
||||
|
@@ -104,15 +104,6 @@ namespace MonoTests.System.Linq.Expressions
|
||||
Assert.IsTrue (baz_is_bar (new Baz ()));
|
||||
}
|
||||
|
||||
#if !NET_4_0 // dlr bug 5868
|
||||
[Test]
|
||||
[Category ("NotDotNet")]
|
||||
[ExpectedException (typeof (ArgumentException))]
|
||||
public void TypeIsVoid ()
|
||||
{
|
||||
Expression.TypeIs ("yoyo".ToConstant (), typeof (void));
|
||||
}
|
||||
#endif
|
||||
|
||||
public static void TacTac ()
|
||||
{
|
||||
|
@@ -2124,7 +2124,6 @@ namespace MonoTests.System.Linq
|
||||
Assert.That (Enumerable.AsEnumerable<object> (null), Is.Null);
|
||||
}
|
||||
|
||||
#if NET_4_0
|
||||
[Test]
|
||||
[ExpectedException (typeof (ArgumentNullException))]
|
||||
public void Zip_FirstSourceNull_ThrowsArgumentNullException ()
|
||||
@@ -2157,7 +2156,6 @@ namespace MonoTests.System.Linq
|
||||
b = new [] { 100, 200, 300 };
|
||||
a.Zip (b, (f, s) => f + s.ToString ()).AssertEquals ("a100");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
private Reader<T> Read<T> (params T [] source)
|
||||
|
@@ -24,7 +24,6 @@
|
||||
//
|
||||
//
|
||||
|
||||
#if NET_4_0
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
@@ -920,4 +919,3 @@ namespace MonoTests.System.Linq
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -1,4 +1,3 @@
|
||||
#if NET_4_0
|
||||
// TestHelper.cs
|
||||
//
|
||||
// Copyright (c) 2008 Jérémie "Garuma" Laval
|
||||
@@ -91,4 +90,3 @@ namespace MonoTests.System.Linq
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -26,7 +26,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_4_0
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
@@ -62,4 +61,3 @@ namespace MonoTests.System.Runtime.CompilerServices
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -24,7 +24,6 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#if NET_4_0
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
@@ -56,4 +55,3 @@ namespace MonoTests.System.Threading.Tasks
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user