merged Sys.Web.Services 2.0 support in my branch:
[mono.git] / mcs / class / corlib / Test / System.IO / MemoryStreamTest.cs
1 //
2 // System.IO.MemoryStreamTest
3 //
4 // Authors:
5 //      Marcin Szczepanski (marcins@zipworld.com.au)
6 //      Gonzalo Paniagua Javier (gonzalo@ximian.com)
7 //      Sebastien Pouliot  <sebastien@ximian.com>
8 //
9 // (c) 2003 Ximian, Inc. (http://www.ximian.com)
10 // Copyright (C) 2004 Novell (http://www.novell.com)
11 //
12
13 using System;
14 using System.IO;
15 using System.Runtime.Serialization.Formatters.Binary;
16 using System.Text;
17
18 using NUnit.Framework;
19
20 namespace MonoTests.System.IO
21 {
22         [TestFixture]
23         public class MemoryStreamTest
24         {
25                 MemoryStream testStream;
26                 byte [] testStreamData;
27
28                 [SetUp]
29                 public void SetUp ()
30                 {
31                         testStreamData = new byte [100];
32
33                         for (int i = 0; i < 100; i++)
34                                 testStreamData[i] = (byte) (100 - i);
35
36                         testStream = new MemoryStream (testStreamData);
37                 }
38
39                 // 
40                 // Verify that the first count bytes in testBytes are the same as
41                 // the count bytes from index start in testStreamData
42                 //
43                 void VerifyTestData (string id, byte [] testBytes, int start, int count)
44                 {
45                         if (testBytes == null)
46                                 Assert.Fail (id + "+1 testBytes is null");
47
48                         if (start < 0 ||
49                             count < 0  ||
50                             start + count > testStreamData.Length ||
51                             start > testStreamData.Length)
52                                 throw new ArgumentOutOfRangeException (id + "+2");
53
54                         for (int test = 0; test < count; test++) {
55                                 if (testBytes [test] == testStreamData [start + test])
56                                         continue;
57
58                                 string failStr = "testByte {0} (testStream {1}) was <{2}>, expecting <{3}>";
59                                 failStr = String.Format (failStr,
60                                                         test,
61                                                         start + test,
62                                                         testBytes [test],
63                                                         testStreamData [start + test]);
64                                 Assert.Fail (id + "-3" + failStr);
65                         }
66                 }
67
68                 public void AssertEquals (string message, int expected, int actual)
69                 {
70                         Assert.AreEqual (expected, actual, message);
71                 }
72
73                 public void AssertEquals (string message, long expected, long actual)
74                 {
75                         Assert.AreEqual (expected, actual, message);
76                 }
77
78                 public void AssertEquals (string message, bool expected, bool actual)
79                 {
80                         Assert.AreEqual (expected, actual, message);
81                 }
82
83                 [Test]
84                 public void ConstructorsOne ()
85                 {
86                         MemoryStream ms = new MemoryStream();
87
88                         AssertEquals ("#01", 0L, ms.Length);
89                         AssertEquals ("#02", 0, ms.Capacity);
90                         AssertEquals ("#03", true, ms.CanWrite);
91                 }
92
93                 [Test]
94                 public void ConstructorsTwo ()
95                 {
96                         MemoryStream ms = new MemoryStream (10);
97
98                         AssertEquals ("#01", 0L, ms.Length);
99                         AssertEquals ("#02", 10, ms.Capacity);
100                         ms.Capacity = 0;
101                         byte [] buffer = ms.GetBuffer ();
102                         // Begin: wow!!!
103                         AssertEquals ("#03", -1, ms.ReadByte ());
104                         Assert.IsNull (buffer, "#04"); // <--
105                         ms.Read (new byte [5], 0, 5);
106                         AssertEquals ("#05", 0, ms.Position);
107                         AssertEquals ("#06", 0, ms.Length);
108                         // End
109                 }
110
111                 [Test]
112                 public void ConstructorsThree ()
113                 {
114                         MemoryStream ms = new MemoryStream (testStreamData);
115                         AssertEquals ("#01", 100, ms.Length);
116                         AssertEquals ("#02", 0, ms.Position);
117                 }
118
119                 [Test]
120                 public void ConstructorsFour ()
121                 {
122                         MemoryStream ms = new MemoryStream (testStreamData, true);
123                         AssertEquals ("#01", 100, ms.Length);
124                         AssertEquals ("#02", 0, ms.Position);
125                         ms.Position = 50;
126                         byte saved = testStreamData [50];
127                         try {
128                                 ms.WriteByte (23);
129                                 AssertEquals ("#03", testStreamData [50], 23);
130                         } finally {
131                                 testStreamData [50] = saved;
132                         }
133                         ms.Position = 100;
134                         try {
135                                 ms.WriteByte (23);
136                         } catch (Exception) {
137                                 return;
138                         }
139                         Assert.Fail ("#04");
140                 }
141
142                 [Test]
143                 public void ConstructorsFive ()
144                 {
145                         MemoryStream ms = new MemoryStream (testStreamData, 50, 50);
146                         AssertEquals ("#01", 50, ms.Length);
147                         AssertEquals ("#02", 0, ms.Position);
148                         AssertEquals ("#03", 50, ms.Capacity);
149                         ms.Position = 1;
150                         byte saved = testStreamData [51];
151                         try {
152                                 ms.WriteByte (23);
153                                 AssertEquals ("#04", testStreamData [51], 23);
154                         } finally {
155                                 testStreamData [51] = saved;
156                         }
157                         ms.Position = 100;
158                         bool gotException = false;
159                         try {
160                                 ms.WriteByte (23);
161                         } catch (NotSupportedException) {
162                                 gotException = true;
163                         }
164
165                         if (!gotException)
166                                 Assert.Fail ("#05");
167
168                         ms.Capacity = 100; // Allowed. It's the same as the one in the ms.
169                                            // This is lame, as the length is 50!!!
170                                            
171                         gotException = false;
172                         try {
173                                 ms.Capacity = 51;
174                         } catch (NotSupportedException) {
175                                 gotException = true;
176                         }
177
178                         if (!gotException)
179                                 Assert.Fail ("#07");
180
181                         AssertEquals ("#08", 50, ms.ToArray ().Length);
182                 }
183
184                 [Test]
185                 [ExpectedException (typeof (ArgumentOutOfRangeException))]
186                 public void ConstructorsSix ()
187                 {
188                         MemoryStream ms = new MemoryStream (-2);
189                 }
190
191                 [Test]
192                 public void Read ()
193                 {
194                         byte [] readBytes = new byte [20];
195
196                         /* Test simple read */
197                         testStream.Read (readBytes, 0, 10);
198                         VerifyTestData ("R1", readBytes, 0, 10);
199
200                         /* Seek back to beginning */
201
202                         testStream.Seek (0, SeekOrigin.Begin);
203
204                         /* Read again, bit more this time */
205                         testStream.Read (readBytes, 0, 20);
206                         VerifyTestData ("R2", readBytes, 0, 20);
207
208                         /* Seek to 20 bytes from End */
209                         testStream.Seek (-20, SeekOrigin.End);
210                         testStream.Read (readBytes, 0, 20);
211                         VerifyTestData ("R3", readBytes, 80, 20);
212
213                         int readByte = testStream.ReadByte();
214                         Assert.AreEqual (-1, readByte, "R4");
215                 }
216
217                 [Test]
218                 public void WriteBytes ()
219                 {
220                         byte[] readBytes = new byte[100];
221
222                         MemoryStream ms = new MemoryStream (100);
223
224                         for (int i = 0; i < 100; i++)
225                                 ms.WriteByte (testStreamData [i]);
226
227                         ms.Seek (0, SeekOrigin.Begin); 
228                         testStream.Read (readBytes, 0, 100);
229                         VerifyTestData ("W1", readBytes, 0, 100);
230                 }               
231
232                 [Test]
233                 public void WriteBlock ()
234                 {
235                         byte[] readBytes = new byte[100];
236
237                         MemoryStream ms = new MemoryStream (100);
238
239                         ms.Write (testStreamData, 0, 100);
240                         ms.Seek (0, SeekOrigin.Begin); 
241                         testStream.Read (readBytes, 0, 100);
242                         VerifyTestData ("WB1", readBytes, 0, 100);
243                         byte[] arrayBytes = testStream.ToArray();
244                         AssertEquals ("#01", 100, arrayBytes.Length);
245                         VerifyTestData ("WB2", arrayBytes, 0, 100);
246                 }
247
248                 [Test]
249                 public void PositionLength ()
250                 {
251                         MemoryStream ms = new MemoryStream ();
252                         ms.Position = 4;
253                         ms.WriteByte ((byte) 'M');
254                         ms.WriteByte ((byte) 'O');
255                         AssertEquals ("#01", 6, ms.Length);
256                         AssertEquals ("#02", 6, ms.Position);
257                         ms.Position = 0;
258                         AssertEquals ("#03", 0, ms.Position);
259                 }
260
261                 [Test]
262                 [ExpectedException (typeof (NotSupportedException))]
263                 public void MorePositionLength ()
264                 {
265                         MemoryStream ms = new MemoryStream (testStreamData);
266                         ms.Position = 101;
267                         AssertEquals ("#01", 101, ms.Position);
268                         AssertEquals ("#02", 100, ms.Length);
269                         ms.WriteByte (1); // This should throw the exception
270                 }
271
272                 [Test]
273                 public void GetBufferOne ()
274                 {
275                         MemoryStream ms = new MemoryStream ();
276                         byte [] buffer = ms.GetBuffer ();
277                         AssertEquals ("#01", 0, buffer.Length);
278                 }
279
280                 [Test]
281                 public void GetBufferTwo ()
282                 {
283                         MemoryStream ms = new MemoryStream (100);
284                         byte [] buffer = ms.GetBuffer ();
285                         AssertEquals ("#01", 100, buffer.Length);
286
287                         ms.Write (testStreamData, 0, 100);
288                         ms.Write (testStreamData, 0, 100);
289                         AssertEquals ("#02", 200, ms.Length);
290                         buffer = ms.GetBuffer ();
291                         AssertEquals ("#03", 256, buffer.Length); // Minimun size after writing
292                 }
293
294                 [Test]
295                 public void Closed ()
296                 {
297                         MemoryStream ms = new MemoryStream (100);
298                         ms.Close ();
299                         bool thrown = false;
300                         try {
301                                 int x = ms.Capacity;
302                         } catch (ObjectDisposedException) {
303                                 thrown = true;
304                         }
305
306                         if (!thrown)
307                                 Assert.Fail ("#01");
308
309                         thrown = false;
310                         try {
311                                 ms.Capacity = 1;
312                         } catch (ObjectDisposedException) {
313                                 thrown = true;
314                         }
315
316                         if (!thrown)
317                                 Assert.Fail ("#02");
318
319                         // The first exception thrown is ObjectDisposed, not ArgumentNull
320                         thrown = false;
321                         try {
322                                 ms.Read (null, 0, 1);
323                         } catch (ObjectDisposedException) {
324                                 thrown = true;
325                         }
326
327                         if (!thrown)
328                                 Assert.Fail ("#03");
329
330                         thrown = false;
331                         try {
332                                 ms.Write (null, 0, 1);
333                         } catch (ObjectDisposedException) {
334                                 thrown = true;
335                         }
336
337                         if (!thrown)
338                                 Assert.Fail ("#03");
339                 }
340
341                 [Test]
342                 [ExpectedException (typeof (ObjectDisposedException))]
343                 public void Close_get_Length () 
344                 {
345                         MemoryStream ms = new MemoryStream (100);
346                         ms.Close ();
347                         long x = ms.Length;
348                 }
349
350                 [Test]
351                 [ExpectedException (typeof (ObjectDisposedException))]
352                 public void Close_get_Position () 
353                 {
354                         MemoryStream ms = new MemoryStream (100);
355                         ms.Close ();
356                         long x = ms.Position;
357                 }
358
359                 [Test]
360                 [ExpectedException (typeof (ObjectDisposedException))]
361                 public void Close_set_Position () 
362                 {
363                         MemoryStream ms = new MemoryStream (100);
364                         ms.Close ();
365                         ms.Position = 0;
366                 }
367
368                 [Test]
369                 public void Seek ()
370                 {
371                         MemoryStream ms = new MemoryStream (100);
372                         ms.Write (testStreamData, 0, 100);
373                         ms.Seek (0, SeekOrigin.Begin);
374                         ms.Position = 50;
375                         ms.Seek (-50, SeekOrigin.Current);
376                         ms.Seek (-50, SeekOrigin.End);
377
378                         bool thrown = false;
379                         ms.Position = 49;
380                         try {
381                                 ms.Seek (-50, SeekOrigin.Current);
382                         } catch (IOException) {
383                                 thrown = true;
384                         }
385                         if (!thrown)
386                                 Assert.Fail ("#01");
387                         
388                         thrown = false;
389                         try {
390                                 ms.Seek (Int64.MaxValue, SeekOrigin.Begin);
391                         } catch (ArgumentOutOfRangeException) {
392                                 thrown = true;
393                         }
394
395                         if (!thrown)
396                                 Assert.Fail ("#02");
397
398                         thrown=false;
399                         try {
400                                 // Oh, yes. They throw IOException for this one, but ArgumentOutOfRange for the previous one
401                                 ms.Seek (Int64.MinValue, SeekOrigin.Begin);
402                         } catch (IOException) {
403                                 thrown = true;
404                         }
405
406                         if (!thrown)
407                                 Assert.Fail ("#03");
408
409                         ms=new MemoryStream (256);
410
411                         ms.Write (testStreamData, 0, 100);
412                         ms.Position=0;
413                         AssertEquals ("#01", 100, ms.Length);
414                         AssertEquals ("#02", 0, ms.Position);
415
416                         ms.Position=128;
417                         AssertEquals ("#03", 100, ms.Length);
418                         AssertEquals ("#04", 128, ms.Position);
419
420                         ms.Position=768;
421                         AssertEquals ("#05", 100, ms.Length);
422                         AssertEquals ("#06", 768, ms.Position);
423
424                         ms.WriteByte (0);
425                         AssertEquals ("#07", 769, ms.Length);
426                         AssertEquals ("#08", 769, ms.Position);
427                 }
428
429                 [Test]
430                 [ExpectedException (typeof (ObjectDisposedException))]
431                 public void Seek_Disposed () 
432                 {
433                         MemoryStream ms = new MemoryStream ();
434                         ms.Close ();
435                         ms.Seek (0, SeekOrigin.Begin);
436                 }
437
438                 [Test]
439                 public void SetLength ()
440                 {
441                         MemoryStream ms = new MemoryStream ();
442                         ms.Write (testStreamData, 0, 100);
443                         ms.Position = 100;
444                         ms.SetLength (150);
445                         AssertEquals ("#01", 150, ms.Length);
446                         AssertEquals ("#02", 100, ms.Position);
447                         ms.SetLength (80);
448                         AssertEquals ("#03", 80, ms.Length);
449                         AssertEquals ("#04", 80, ms.Position);
450                 }
451
452                 [Test]
453                 [ExpectedException (typeof (NotSupportedException))]
454                 public void SetLength_ReadOnly ()
455                 {
456                         MemoryStream ms = new MemoryStream (testStreamData, false);
457                         ms.SetLength (10);
458                 }
459
460                 [Test]
461                 [ExpectedException (typeof (NotSupportedException))]
462                 public void WriteNonWritable ()
463                 {
464                         MemoryStream ms = new MemoryStream (testStreamData, false);
465                         ms.Write (testStreamData, 0, 100);
466                 }
467
468                 [Test]
469                 [ExpectedException (typeof (NotSupportedException))]
470                 public void WriteExpand ()
471                 {
472                         MemoryStream ms = new MemoryStream (testStreamData);
473                         ms.Write (testStreamData, 0, 100);
474                         ms.Write (testStreamData, 0, 100); // This one throws the exception
475                 }
476
477                 [Test]
478                 public void WriteByte ()
479                 {
480                         MemoryStream ms = new MemoryStream (100);
481                         ms.Write (testStreamData, 0, 100);
482                         ms.Position = 100;
483                         ms.WriteByte (101);
484                         AssertEquals ("#01", 101, ms.Position);
485                         AssertEquals ("#02", 101, ms.Length);
486                         AssertEquals ("#03", 256, ms.Capacity);
487                         ms.Write (testStreamData, 0, 100);
488                         ms.Write (testStreamData, 0, 100);
489                         // 301
490                         AssertEquals ("#04", 301, ms.Position);
491                         AssertEquals ("#05", 301, ms.Length);
492                         AssertEquals ("#06", 512, ms.Capacity);
493                 }
494
495                 [Test]
496                 public void WriteLengths () {
497                         MemoryStream ms=new MemoryStream (256);
498                         BinaryWriter writer=new BinaryWriter (ms);
499
500                         writer.Write ((byte)'1');
501                         AssertEquals ("#01", 1, ms.Length);
502                         AssertEquals ("#02", 256, ms.Capacity);
503                         
504                         writer.Write ((ushort)0);
505                         AssertEquals ("#03", 3, ms.Length);
506                         AssertEquals ("#04", 256, ms.Capacity);
507
508                         writer.Write (testStreamData, 0, 23);
509                         AssertEquals ("#05", 26, ms.Length);
510                         AssertEquals ("#06", 256, ms.Capacity);
511
512                         writer.Write (testStreamData);
513                         writer.Write (testStreamData);
514                         writer.Write (testStreamData);
515                         AssertEquals ("#07", 326, ms.Length);
516                 }
517
518                 [Test]
519                 public void MoreWriteByte ()
520                 {
521                         byte[] buffer = new byte [44];
522                         
523                         MemoryStream ms = new MemoryStream (buffer);
524                         BinaryWriter bw = new BinaryWriter (ms);
525                         for(int i=0; i < 44; i++)
526                                 bw.Write ((byte) 1);
527                 }
528
529                 [Test]
530                 [ExpectedException (typeof (NotSupportedException))]
531                 public void MoreWriteByte2 ()
532                 {
533                         byte[] buffer = new byte [43]; // Note the 43 here
534                         
535                         MemoryStream ms = new MemoryStream (buffer);
536                         BinaryWriter bw = new BinaryWriter (ms);
537                         for(int i=0; i < 44; i++)
538                                 bw.Write ((byte) 1);
539                 }
540
541                 [Test]
542                 public void Expand () 
543                 {
544                         byte[] array = new byte [8] { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 };
545                         MemoryStream ms = new MemoryStream ();
546                         ms.Write (array, 0, array.Length);
547                         ms.SetLength (4);
548                         ms.Seek (4, SeekOrigin.End);
549                         ms.WriteByte (0xFF);
550                         Assert.AreEqual ("01-01-01-01-00-00-00-00-FF", BitConverter.ToString (ms.ToArray ()), "Result");
551                 }
552
553                 [Test]
554                 public void PubliclyVisible ()
555                 {
556                         MemoryStream ms = new MemoryStream ();
557                         Assert.IsNotNull (ms.GetBuffer (), "ctor()");
558
559                         ms = new MemoryStream (1);
560                         Assert.IsNotNull (ms.GetBuffer (), "ctor(1)");
561
562                         ms = new MemoryStream (new byte[1], 0, 1, true, true);
563                         Assert.IsNotNull (ms.GetBuffer (), "ctor(byte[],int,int,bool,bool");
564                 }
565
566                 [Test]
567                 [ExpectedException (typeof (UnauthorizedAccessException))]
568                 public void PubliclyVisible_Ctor_ByteArray ()
569                 {
570                         MemoryStream ms = new MemoryStream (new byte[0]);
571                         Assert.IsNotNull (ms.GetBuffer ());
572                 }
573
574                 [Test]
575                 [ExpectedException (typeof (UnauthorizedAccessException))]
576                 public void PubliclyVisible_Ctor_ByteArray_Boolean ()
577                 {
578                         MemoryStream ms = new MemoryStream (new byte[0], true);
579                         Assert.IsNotNull (ms.GetBuffer ());
580                 }
581
582                 [Test]
583                 [ExpectedException (typeof (UnauthorizedAccessException))]
584                 public void PubliclyVisible_Ctor_ByteArray_Int_Int ()
585                 {
586                         MemoryStream ms = new MemoryStream (new byte[1], 0, 1);
587                         Assert.IsNotNull (ms.GetBuffer ());
588                 }
589
590                 [Test]
591                 [ExpectedException (typeof (UnauthorizedAccessException))]
592                 public void PubliclyVisible_Ctor_ByteArray_Int_Int_Boolean ()
593                 {
594                         MemoryStream ms = new MemoryStream (new byte[1], 0, 1, true);
595                         Assert.IsNotNull (ms.GetBuffer ());
596                 }
597
598                 [Test]
599                 [ExpectedException (typeof (UnauthorizedAccessException))]
600                 public void PubliclyVisible_Ctor_ByteArray_Int_Int_Boolean_Boolean ()
601                 {
602                         MemoryStream ms = new MemoryStream (new byte[1], 0, 1, true, false);
603                         Assert.IsNotNull (ms.GetBuffer ());
604                 }
605
606                 [Test] // bug #80205
607                 [Category ("NotWorking")]
608                 public void SerializeTest ()
609                 {
610                         MemoryStream input = new MemoryStream ();
611                         byte [] bufferIn = Encoding.UTF8.GetBytes ("some test");
612                         input.Write (bufferIn, 0, bufferIn.Length);
613                         input.Position = 0;
614
615                         BinaryFormatter bf = new BinaryFormatter ();
616                         MemoryStream ms = new MemoryStream ();
617                         bf.Serialize (ms, input);
618
619                         byte [] bufferOut = new byte [ms.Length];
620                         ms.Position = 0;
621                         ms.Read (bufferOut, 0, bufferOut.Length);
622
623                         Assert.AreEqual (_serialized, bufferOut);
624                 }
625
626                 [Test] // bug #80205
627                 [Category ("NotWorking")]
628                 public void DeserializeTest ()
629                 {
630                         MemoryStream ms = new MemoryStream ();
631                         ms.Write (_serialized, 0, _serialized.Length);
632                         ms.Position = 0;
633
634                         BinaryFormatter bf = new BinaryFormatter ();
635                         MemoryStream output = (MemoryStream) bf.Deserialize (ms);
636                         using (StreamReader sr = new StreamReader (output)) {
637                                 Assert.AreEqual ("some test", sr.ReadToEnd ());
638                         }
639                 }
640
641                 private static byte [] _serialized = new byte [] {
642                         0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
643                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00,
644                         0x16, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x4f, 0x2e,
645                         0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61,
646                         0x6d, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x5f, 0x62, 0x75, 0x66, 0x66,
647                         0x65, 0x72, 0x07, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x09,
648                         0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x07, 0x5f,
649                         0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x09, 0x5f, 0x63, 0x61, 0x70,
650                         0x61, 0x63, 0x69, 0x74, 0x79, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x61,
651                         0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x09, 0x5f, 0x77, 0x72, 0x69,
652                         0x74, 0x61, 0x62, 0x6c, 0x65, 0x0a, 0x5f, 0x65, 0x78, 0x70, 0x6f,
653                         0x73, 0x61, 0x62, 0x6c, 0x65, 0x07, 0x5f, 0x69, 0x73, 0x4f, 0x70,
654                         0x65, 0x6e, 0x1d, 0x4d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x42,
655                         0x79, 0x52, 0x65, 0x66, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2b,
656                         0x5f, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x07,
657                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x08,
658                         0x08, 0x08, 0x08, 0x01, 0x01, 0x01, 0x01, 0x09, 0x02, 0x00, 0x00,
659                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,
660                         0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0a,
661                         0x0f, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x73,
662                         0x6f, 0x6d, 0x65, 0x20, 0x74, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00,
663                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
664                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
665                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
666                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
667                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
668                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
669                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
670                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
671                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
672                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
673                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
674                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
675                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
676                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
677                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
678                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
679                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
680                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
681                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
682                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
683                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
684                         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
685                         0x00, 0x00, 0x0b };
686         }
687 }
688