Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / ipaddress.cs
1 using System.Net;
2 using System.Net.Sockets;
3 using System.IO;
4 using System;
5
6 namespace T {
7         public class T {
8
9                 public static int Main () {
10
11                         /*
12                         Console.WriteLine ("address is " + IPAddress.NetworkToHostOrder (0x0100007f).ToString("X"));
13                         */
14                         
15                         IPAddress testadd = IPAddress.Parse ("127.0.0.1");
16                         Console.WriteLine("address is " + testadd.Address.ToString ("X"));
17                         if (testadd.Address != 0x0100007f)
18                                 return 1;
19
20                         
21                         IPAddress hostadd = new IPAddress(0x0100007f);
22                         Console.WriteLine("address is " + hostadd.ToString());
23                         if (hostadd.ToString() != "127.0.0.1")
24                                 return 1;
25
26                         return 0;
27                 }
28         }
29 }
30