Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test for bug #339013.

svn path=/trunk/mono/; revision=89186
  • Loading branch information...
commit 597c58bbf3e1e9b0cf540043120eabb8ed256fc4 1 parent e177791
@illupus illupus authored
Showing with 22 additions and 0 deletions.
  1. +1 −0  mono/tests/Makefile.am
  2. +21 −0 mono/tests/dbnull-missing.cs
View
1  mono/tests/Makefile.am
@@ -239,6 +239,7 @@ TEST_CS_SRC= \
handleref.cs \
transparentproxy.cs \
imt_big_iface_test.cs \
+ dbnull-missing.cs \
soft-float-tests.cs
if X86
View
21 mono/tests/dbnull-missing.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+class X {
+ static int Main ()
+ {
+ ParameterInfo [] pi = typeof (X).GetMethod ("TakesInt").GetParameters ();
+
+ Console.WriteLine ("{0} and {1}", pi [0].DefaultValue.GetType (), pi [1].DefaultValue.GetType ());
+ if (pi [0].DefaultValue.GetType () != typeof (DBNull))
+ return 1;
+ if (pi [1].DefaultValue.GetType () != typeof (Missing))
+ return 2;
+ return 0;
+ }
+
+ public static void TakesInt (int b, [Optional] int a)
+ {
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.