2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / tests / bitconverter.cs
blob853f22e95d1ec58fd7cd8e03a92d35b7a6d394c2
1 using System;
3 namespace Test {
5 public class Test {
6 public static int Main() {
7 byte[] rep;
8 double d = 5.0;
10 rep = BitConverter.GetBytes (d);
11 double res = BitConverter.ToDouble (rep, 0);
12 #if DEBUG
13 Console.WriteLine ("{0} {1} {2} {3} {4} {5} {6} {7}",
14 rep [0], rep [1], rep [2], rep [3], rep [4],
15 rep [5], rep [6], rep [7]);
16 #endif
17 if (d != res)
18 return 1;
19 return 0;