Permalink
Browse files

Test for bug #339013.

svn path=/trunk/mono/; revision=89186
  • Loading branch information...
1 parent e177791 commit 597c58bbf3e1e9b0cf540043120eabb8ed256fc4 @illupus illupus committed Nov 8, 2007
Showing with 22 additions and 0 deletions.
  1. +1 −0 mono/tests/Makefile.am
  2. +21 −0 mono/tests/dbnull-missing.cs
View
@@ -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
@@ -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)
+ {
+ }
+}

0 comments on commit 597c58b

Please sign in to comment.