projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #961 from ermshiperete/bug-xamarin-18118
[mono.git]
/
mono
/
mini
/
exceptions.cs
diff --git
a/mono/mini/exceptions.cs
b/mono/mini/exceptions.cs
index 49dca8d1ba12e720ceb0b07cf3fd67595e88c161..ed9ca4da7865dafab857618fb96e810393082620 100644
(file)
--- a/
mono/mini/exceptions.cs
+++ b/
mono/mini/exceptions.cs
@@
-24,11
+24,18
@@
using System.Runtime.CompilerServices;
* the IL code looks.
*/
* the IL code looks.
*/
-class Tests {
-
+#if MOBILE
+class ExceptionTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
+#endif
public static int test_0_catch () {
Exception x = new Exception ();
public static int test_0_catch () {
Exception x = new Exception ();
@@
-2311,16
+2318,6
@@
class Tests {
public static int test_0_array_size () {
bool failed;
public static int test_0_array_size () {
bool failed;
- try {
- failed = true;
- int[] mem1 = new int [Int32.MaxValue];
- }
- catch (OutOfMemoryException e) {
- failed = false;
- }
- if (failed)
- return 1;
-
try {
failed = true;
int[,] mem2 = new int [Int32.MaxValue, Int32.MaxValue];
try {
failed = true;
int[,] mem2 = new int [Int32.MaxValue, Int32.MaxValue];
@@
-2408,7
+2405,7
@@
class Tests {
}
public static int test_0_nonvirt_nullref_at_clause_start () {
}
public static int test_0_nonvirt_nullref_at_clause_start () {
- Tests t = null;
+
Exception
Tests t = null;
try {
t.amethod ();
} catch (NullReferenceException) {
try {
t.amethod ();
} catch (NullReferenceException) {
@@
-2528,7
+2525,11
@@
class Tests {
public static int test_0_lmf_filter () {
try {
// The invoke calls a runtime-invoke wrapper which has a filter clause
public static int test_0_lmf_filter () {
try {
// The invoke calls a runtime-invoke wrapper which has a filter clause
+#if MOBILE
+ typeof (ExceptionTests).GetMethod ("lmf_filter").Invoke (null, new object [] { });
+#else
typeof (Tests).GetMethod ("lmf_filter").Invoke (null, new object [] { });
typeof (Tests).GetMethod ("lmf_filter").Invoke (null, new object [] { });
+#endif
} catch (TargetInvocationException) {
}
return 0;
} catch (TargetInvocationException) {
}
return 0;
@@
-2732,3
+2733,8
@@
class Tests {
}
}
}
}
+#if !MOBILE
+class ExceptionTests : Tests
+{
+}
+#endif
\ No newline at end of file