+/* -*- Mode: Java; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
+/* vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) */
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  *

    bytearray_bad[6]=0xB8;
    bytearray_bad[7]=0x80;
    AddTestCase(
      "ByteArray with out-of-range utf-8 sequence",
      "\udbbf\udfff\u00BF\u4e00",
      bytearray_bad.toString());

// compress/uncompress
    var bytearray_compress = new ByteArray();
    bytearray_compress[0]=0xef;
    bytearray_compress[1]=0xbb;
    bytearray_compress[2]=0xbf;

    // check the uncompress/compress length should equal original length 7
    var restoredlength=bytearray_compress.length;
    var restorestate=(bytearray_compress[0]==0xef &&
					  bytearray_compress[1]==0xbb &&
					  bytearray_compress[2]==0xbf &&
					  bytearray_compress[3]==100 &&
					  bytearray_compress[4]==97 &&
					  bytearray_compress[5]==110 &&
					  bytearray_compress[6]==33
		);
    AddTestCase("ByteArray.compress bytearray length is different",
                origlength==compresslength,false);
    AddTestCase("ByteArray.compress bytearray contents differ",
