Home | History | Annotate | Download | only in src

Lines Matching defs:charToByte

127     charToByte();
532 private static void charToByte() {
533 assertByteEquals((byte)1, $opt$CharToByte((char)1));
534 assertByteEquals((byte)0, $opt$CharToByte((char)0));
535 assertByteEquals((byte)51, $opt$CharToByte((char)51));
536 assertByteEquals((byte)127, $opt$CharToByte((char)127)); // 2^7 - 1
537 assertByteEquals((byte)-128, $opt$CharToByte((char)128)); // 2^7
538 assertByteEquals((byte)-1, $opt$CharToByte((char)32767)); // 2^15 - 1
539 assertByteEquals((byte)-1, $opt$CharToByte((char)65535)); // 2^16 - 1
540 assertByteEquals((byte)-1, $opt$CharToByte((char)-1));
541 assertByteEquals((byte)-51, $opt$CharToByte((char)-51));
542 assertByteEquals((byte)-127, $opt$CharToByte((char)-127)); // -(2^7 - 1)
543 assertByteEquals((byte)-128, $opt$CharToByte((char)-128)); // -(2^7)
544 assertByteEquals((byte)127, $opt$CharToByte((char)-129)); // -(2^7 + 1)
678 static byte $opt$CharToByte(char a) { return (byte)a; }