[interp] disable some tests that fail on CI only
[mono.git] / mono / tests / binwritter.cs
1 using System;
2 using System.IO;
3
4 public class BinaryWrTest {
5         public static int Main () {
6                 MemoryStream mr = new MemoryStream();
7                 BinaryWriter wr = new BinaryWriter(mr);
8
9                 wr.Write ((byte) 1);
10                 wr.Write ((int) 1);
11                 wr.Write ((int) -1);
12
13                 byte [] arr = mr.ToArray();
14
15                 Console.Write ("Array (should be: 1 1 0 0 0 ff ff ff ff): ");
16
17                 for (int a = 0; a != arr.Length; a++)
18                         Console.Write(arr[a].ToString("x") + " ");              
19
20                 Console.WriteLine();
21
22                 if (arr.Length != 9)
23                         return 4;
24
25                 if (arr[0] != 1) 
26                         return 1;
27
28                 if (arr[1] != 1 && arr[2] != 0 && arr[3] != 0 && arr[4] != 0)
29                         return 2;
30
31                 if (arr[5] != 0xff && arr[6] != 0xff && arr[7] != 0xff && arr[8] != 0xff)
32                         return 3;
33         
34                 Console.WriteLine("test-ok");
35
36                 return 0;
37         }
38 }
39
40