2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
[mcs.git] / tests / test-473.cs
blobd3b2acaaa65ebe7bacd7669ea9bdc9c9d39b6866
1 using System;
2 using System.Runtime.InteropServices;
4 [Obsolete ("Use Errno", true)]
5 public enum Error {
6 EROFS,
7 ERANGE = TestConst.C,
8 EANOTHER = ERANGE,
11 public enum Error_2 {
12 [Obsolete ("Use A", true)]
13 ERANGE,
14 [Obsolete ("Use B", true)]
15 EANOTHER = ERANGE,
19 [Obsolete ("Use Native.SignalHandler", true)]
20 public delegate void SignalHandler (int signal);
22 [Obsolete ("Use Errno", true)]
23 public sealed class UnixMarshal {
25 public static readonly SignalHandler SIG_DFL = new SignalHandler(Default);
27 static UnixMarshal ()
29 Stdlib s = new Stdlib ();
32 private static void Default (int signal)
36 public static string GetDescription (Error e) {
37 return null;
41 public sealed class UnixMarshal2 {
42 [Obsolete ("Use Errno", true)]
43 public static string GetDescription (Error e) {
44 return null;
48 [Obsolete ("Use Native.Stdlib", true)]
49 public class Stdlib {
51 enum E {
52 val1 = TestConst.C
55 internal const string LIBC = "msvcrt.dll";
56 [DllImport (LIBC)]
57 public static extern IntPtr signal (int signum, IntPtr handler);
60 class TestConst {
61 [Obsolete ("B", true)]
62 public const int C = 3;
66 [Obsolete ("Use Native.Stdlib", true)]
67 public class XX {
68 private static readonly SignalHandler[] registered_signals;
71 [Obsolete ("Use Native.Pollfd", true)]
72 public struct Pollfd {
75 [Obsolete ("Use Native.Syscall", true)]
76 public class Syscall : XX {
77 public static int poll (Pollfd [] fds, uint nfds, int timeout) {
78 return -1;
83 [Obsolete ("test me", true)]
84 partial struct PS
88 partial struct PS
90 [Obsolete ("Use Errno", true)]
91 public static void GetDescription (Error e) {}
95 [Obsolete ("Replaced by direct enum type casts to/from GLib.Value", true)]
96 public class EnumWrapper {
97 public EnumWrapper (int val)
102 public struct Value
104 [Obsolete ("Replaced by Enum cast", true)]
105 public static explicit operator EnumWrapper (Value val)
107 return new EnumWrapper (334455);
111 class Test {
112 public static void Main () {