fn main() { let char yen = '¥'; // 0xa5 let char c_cedilla = 'ç'; // 0xe7 let char thorn = 'þ'; // 0xfe let char y_diaeresis = 'ÿ'; // 0xff let char pi = 'Π'; // 0x3a0 check (int(yen) == 0xa5); check (int(c_cedilla) == 0xe7); check (int(thorn) == 0xfe); check (int(y_diaeresis) == 0xff); check (int(pi) == 0x3a0); check (int(pi) == int('\u03a0')); check (int('\x0a') == int('\n')); let str bhutan = "འབྲུག་ཡུལ།"; let str japan = "日本"; let str uzbekistan = "Ўзбекистон"; let str austria = "Österreich"; let str bhutan_e = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let str japan_e = "\u65e5\u672c"; let str uzbekistan_e = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let str austria_e = "\u00d6sterreich"; let char oo = 'Ö'; check (int(oo) == 0xd6); fn check_str_eq(str a, str b) { let int i = 0; for (u8 ab in a) { log i; log ab; let u8 bb = b.(i); log bb; check(ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } fn main() { let char yen = '¥'; // 0xa5 let char c_cedilla = 'ç'; // 0xe7 let char thorn = 'þ'; // 0xfe let char y_diaeresis = 'ÿ'; // 0xff let char pi = 'Π'; // 0x3a0 check ((yen as int) == 0xa5); check ((c_cedilla as int) == 0xe7); check ((thorn as int) == 0xfe); check ((y_diaeresis as int) == 0xff); check ((pi as int) == 0x3a0); check ((pi as int) == ('\u03a0' as int)); check (('\x0a' as int) == ('\n' as int)); let str bhutan = "འབྲུག་ཡུལ།"; let str japan = "日本"; let str uzbekistan = "Ўзбекистон"; let str austria = "Österreich"; let str bhutan_e = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let str japan_e = "\u65e5\u672c"; let str uzbekistan_e = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let str austria_e = "\u00d6sterreich"; let char oo = 'Ö'; check ((oo as int) == 0xd6); fn check_str_eq(str a, str b) { let int i = 0; for (u8 ab in a) { log i; log ab; let u8 bb = b.(i); log bb; check(ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // xfail-stage0 fn main() { let char yen = '¥'; // 0xa5 let char c_cedilla = 'ç'; // 0xe7 let char thorn = 'þ'; // 0xfe let char y_diaeresis = 'ÿ'; // 0xff let char pi = 'Π'; // 0x3a0 check ((yen as int) == 0xa5); check ((c_cedilla as int) == 0xe7); check ((thorn as int) == 0xfe); check ((y_diaeresis as int) == 0xff); check ((pi as int) == 0x3a0); check ((pi as int) == ('\u03a0' as int)); check (('\x0a' as int) == ('\n' as int)); let str bhutan = "འབྲུག་ཡུལ།"; let str japan = "日本"; let str uzbekistan = "Ўзбекистон"; let str austria = "Österreich"; let str bhutan_e = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let str japan_e = "\u65e5\u672c"; let str uzbekistan_e = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let str austria_e = "\u00d6sterreich"; let char oo = 'Ö'; check ((oo as int) == 0xd6); fn check_str_eq(str a, str b) { let int i = 0; for (u8 ab in a) { log i; log ab; let u8 bb = b.(i); log bb; check(ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // xfail-stage0 fn main() { let char yen = '¥'; // 0xa5 let char c_cedilla = 'ç'; // 0xe7 let char thorn = 'þ'; // 0xfe let char y_diaeresis = 'ÿ'; // 0xff let char pi = 'Π'; // 0x3a0 assert ((yen as int) == 0xa5); assert ((c_cedilla as int) == 0xe7); assert ((thorn as int) == 0xfe); assert ((y_diaeresis as int) == 0xff); assert ((pi as int) == 0x3a0); assert ((pi as int) == ('\u03a0' as int)); assert (('\x0a' as int) == ('\n' as int)); let str bhutan = "འབྲུག་ཡུལ།"; let str japan = "日本"; let str uzbekistan = "Ўзбекистон"; let str austria = "Österreich"; let str bhutan_e = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let str japan_e = "\u65e5\u672c"; let str uzbekistan_e = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let str austria_e = "\u00d6sterreich"; let char oo = 'Ö'; assert ((oo as int) == 0xd6); fn check_str_eq(str a, str b) { let int i = 0; for (u8 ab in a) { log i; log ab; let u8 bb = b.(i); log bb; assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // xfail-stage0 fn main() { let char yen = '¥'; // 0xa5 let char c_cedilla = 'ç'; // 0xe7 let char thorn = 'þ'; // 0xfe let char y_diaeresis = 'ÿ'; // 0xff let char pi = 'Π'; // 0x3a0 check ((yen as int) == 0xa5); check ((c_cedilla as int) == 0xe7); check ((thorn as int) == 0xfe); check ((y_diaeresis as int) == 0xff); check ((pi as int) == 0x3a0); check ((pi as int) == ('\u03a0' as int)); check (('\x0a' as int) == ('\n' as int)); let str bhutan = "འབྲུག་ཡུལ།"; let str japan = "日本"; let str uzbekistan = "Ўзбекистон"; let str austria = "Österreich"; let str bhutan_e = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let str japan_e = "\u65e5\u672c"; let str uzbekistan_e = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let str austria_e = "\u00d6sterreich"; let char oo = 'Ö'; check ((oo as int) == 0xd6); fn check_str_eq(str a, str b) { let int i = 0; for (u8 ab in a) { log i; log ab; let u8 bb = b.(i); log bb; check(ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // xfail-stage0 fn main() { let char yen = '¥'; // 0xa5 let char c_cedilla = 'ç'; // 0xe7 let char thorn = 'þ'; // 0xfe let char y_diaeresis = 'ÿ'; // 0xff let char pi = 'Π'; // 0x3a0 assert ((yen as int) == 0xa5); assert ((c_cedilla as int) == 0xe7); assert ((thorn as int) == 0xfe); assert ((y_diaeresis as int) == 0xff); assert ((pi as int) == 0x3a0); assert ((pi as int) == ('\u03a0' as int)); assert (('\x0a' as int) == ('\n' as int)); let str bhutan = "འབྲུག་ཡུལ།"; let str japan = "日本"; let str uzbekistan = "Ўзбекистон"; let str austria = "Österreich"; let str bhutan_e = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let str japan_e = "\u65e5\u672c"; let str uzbekistan_e = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let str austria_e = "\u00d6sterreich"; let char oo = 'Ö'; assert ((oo as int) == 0xd6); fn check_str_eq(str a, str b) { let int i = 0; for (u8 ab in a) { log i; log ab; let u8 bb = b.(i); log bb; assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // xfail-stage0 // xfail-stage1 // xfail-stage2 fn main() { let char yen = '¥'; // 0xa5 let char c_cedilla = 'ç'; // 0xe7 let char thorn = 'þ'; // 0xfe let char y_diaeresis = 'ÿ'; // 0xff let char pi = 'Π'; // 0x3a0 assert ((yen as int) == 0xa5); assert ((c_cedilla as int) == 0xe7); assert ((thorn as int) == 0xfe); assert ((y_diaeresis as int) == 0xff); assert ((pi as int) == 0x3a0); assert ((pi as int) == ('\u03a0' as int)); assert (('\x0a' as int) == ('\n' as int)); let str bhutan = "འབྲུག་ཡུལ།"; let str japan = "日本"; let str uzbekistan = "Ўзбекистон"; let str austria = "Österreich"; let str bhutan_e = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let str japan_e = "\u65e5\u672c"; let str uzbekistan_e = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let str austria_e = "\u00d6sterreich"; let char oo = 'Ö'; assert ((oo as int) == 0xd6); fn check_str_eq(str a, str b) { let int i = 0; for (u8 ab in a) { log i; log ab; let u8 bb = b.(i); log bb; assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // xfail-stage0 fn main() { let char yen = '¥'; // 0xa5 let char c_cedilla = 'ç'; // 0xe7 let char thorn = 'þ'; // 0xfe let char y_diaeresis = 'ÿ'; // 0xff let char pi = 'Π'; // 0x3a0 assert ((yen as int) == 0xa5); assert ((c_cedilla as int) == 0xe7); assert ((thorn as int) == 0xfe); assert ((y_diaeresis as int) == 0xff); assert ((pi as int) == 0x3a0); assert ((pi as int) == ('\u03a0' as int)); assert (('\x0a' as int) == ('\n' as int)); let str bhutan = "འབྲུག་ཡུལ།"; let str japan = "日本"; let str uzbekistan = "Ўзбекистон"; let str austria = "Österreich"; let str bhutan_e = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let str japan_e = "\u65e5\u672c"; let str uzbekistan_e = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let str austria_e = "\u00d6sterreich"; let char oo = 'Ö'; assert ((oo as int) == 0xd6); fn check_str_eq(str a, str b) { let int i = 0; for (u8 ab in a) { log i; log ab; let u8 bb = b.(i); log bb; assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // xfail-stage0 fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: str = "འབྲུག་ཡུལ།"; let japan: str = "日本"; let uzbekistan: str = "Ўзбекистон"; let austria: str = "Österreich"; let bhutan_e: str = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: str = "\u65e5\u672c"; let uzbekistan_e: str = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: str = "\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: str, b: str) { let i: int = 0; for ab: u8 in a { log i; log ab; let bb: u8 = b.(i); log bb; assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: str = "འབྲུག་ཡུལ།"; let japan: str = "日本"; let uzbekistan: str = "Ўзбекистон"; let austria: str = "Österreich"; let bhutan_e: str = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: str = "\u65e5\u672c"; let uzbekistan_e: str = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: str = "\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: str, b: str) { let i: int = 0; for ab: u8 in a { log i; log ab; let bb: u8 = b.(i); log bb; assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: str = "འབྲུག་ཡུལ།"; let japan: str = "日本"; let uzbekistan: str = "Ўзбекистон"; let austria: str = "Österreich"; let bhutan_e: str = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: str = "\u65e5\u672c"; let uzbekistan_e: str = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: str = "\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: str, b: str) { let i: int = 0; for ab: u8 in a { log i; log ab; let bb: u8 = b.(i); log bb; assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: str = "འབྲུག་ཡུལ།"; let japan: str = "日本"; let uzbekistan: str = "Ўзбекистон"; let austria: str = "Österreich"; let bhutan_e: str = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: str = "\u65e5\u672c"; let uzbekistan_e: str = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: str = "\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: str, b: str) { let i: int = 0; for ab: u8 in a { log i; log ab; let bb: u8 = b[i]; log bb; assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: str = "འབྲུག་ཡུལ།"; let japan: str = "日本"; let uzbekistan: str = "Ўзбекистон"; let austria: str = "Österreich"; let bhutan_e: str = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: str = "\u65e5\u672c"; let uzbekistan_e: str = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: str = "\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: str, b: str) { let i: int = 0; for ab: u8 in a { log_full(core::debug, i); log_full(core::debug, ab); let bb: u8 = b[i]; log_full(core::debug, bb); assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: str = "འབྲུག་ཡུལ།"; let japan: str = "日本"; let uzbekistan: str = "Ўзбекистон"; let austria: str = "Österreich"; let bhutan_e: str = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: str = "\u65e5\u672c"; let uzbekistan_e: str = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: str = "\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: str, b: str) { let i: int = 0; for ab: u8 in a { log(debug, i); log(debug, ab); let bb: u8 = b[i]; log(debug, bb); assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: str = "འབྲུག་ཡུལ།"; let japan: str = "日本"; let uzbekistan: str = "Ўзбекистон"; let austria: str = "Österreich"; let bhutan_e: str = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: str = "\u65e5\u672c"; let uzbekistan_e: str = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: str = "\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: str, b: str) { let mut i: int = 0; for ab: u8 in a { log(debug, i); log(debug, ab); let bb: u8 = b[i]; log(debug, bb); assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: str = "འབྲུག་ཡུལ།"; let japan: str = "日本"; let uzbekistan: str = "Ўзбекистон"; let austria: str = "Österreich"; let bhutan_e: str = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: str = "\u65e5\u672c"; let uzbekistan_e: str = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: str = "\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: str, b: str) { let mut i: int = 0; for str::each(a) {|ab| log(debug, i); log(debug, ab); let bb: u8 = b[i]; log(debug, bb); assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: str = "འབྲུག་ཡུལ།"; let japan: str = "日本"; let uzbekistan: str = "Ўзбекистон"; let austria: str = "Österreich"; let bhutan_e: str = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: str = "\u65e5\u672c"; let uzbekistan_e: str = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: str = "\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: str, b: str) { let mut i: int = 0; for str::each(a) |ab| { log(debug, i); log(debug, ab); let bb: u8 = b[i]; log(debug, bb); assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for str::each(a) |ab| { log(debug, i); log(debug, ab); let bb: u8 = b[i]; log(debug, bb); assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for str::each(a) |ab| { log(debug, i); log(debug, ab); let bb: u8 = b[i]; log(debug, bb); assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert (yen as int == 0xa5); assert (c_cedilla as int == 0xe7); assert (thorn as int == 0xfe); assert (y_diaeresis as int == 0xff); assert (pi as int == 0x3a0); assert (pi as int == '\u03a0' as int); assert ('\x0a' as int == '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert (oo as int == 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for str::each(a) |ab| { log(debug, i); log(debug, ab); let bb: u8 = b[i]; log(debug, bb); assert (ab == bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 fail_unless!((yen as int == 0xa5)); fail_unless!((c_cedilla as int == 0xe7)); fail_unless!((thorn as int == 0xfe)); fail_unless!((y_diaeresis as int == 0xff)); fail_unless!((pi as int == 0x3a0)); fail_unless!((pi as int == '\u03a0' as int)); fail_unless!(('\x0a' as int == '\n' as int)); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; fail_unless!((oo as int == 0xd6)); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for str::each(a) |ab| { log(debug, i); log(debug, ab); let bb: u8 = b[i]; log(debug, bb); fail_unless!((ab == bb)); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 fail_unless!((yen as int == 0xa5)); fail_unless!((c_cedilla as int == 0xe7)); fail_unless!((thorn as int == 0xfe)); fail_unless!((y_diaeresis as int == 0xff)); fail_unless!((pi as int == 0x3a0)); fail_unless!((pi as int == '\u03a0' as int)); fail_unless!(('\x0a' as int == '\n' as int)); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; fail_unless!((oo as int == 0xd6)); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for str::each(a) |ab| { debug!(i); debug!(ab); let bb: u8 = b[i]; debug!(bb); fail_unless!((ab == bb)); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert!((yen as int == 0xa5)); assert!((c_cedilla as int == 0xe7)); assert!((thorn as int == 0xfe)); assert!((y_diaeresis as int == 0xff)); assert!((pi as int == 0x3a0)); assert!((pi as int == '\u03a0' as int)); assert!(('\x0a' as int == '\n' as int)); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert!((oo as int == 0xd6)); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for str::each(a) |ab| { debug!(i); debug!(ab); let bb: u8 = b[i]; debug!(bb); assert!((ab == bb)); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for str::each(a) |ab| { debug!(i); debug!(ab); let bb: u8 = b[i]; debug!(bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::str; pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for str::each(a) |ab| { debug!(i); debug!(ab); let bb: u8 = b[i]; debug!(bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::iterator::IteratorUtil; pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for a.bytes_iter().advance |ab| { debug!(i); debug!(ab); let bb: u8 = b[i]; debug!(bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for a.bytes_iter().advance |ab| { debug!(i); debug!(ab); let bb: u8 = b[i]; debug!(bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for a.bytes_iter().advance |ab| { info!(i); info!(ab); let bb: u8 = b[i]; info!(bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for a.byte_iter().advance |ab| { info!(i); info!(ab); let bb: u8 = b[i]; info!(bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; foreach ab in a.byte_iter() { info!(i); info!(ab); let bb: u8 = b[i]; info!(bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for ab in a.byte_iter() { info!(i); info!(ab); let bb: u8 = b[i]; info!(bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for ab in a.byte_iter() { info2!("{}", i); info2!("{}", ab); let bb: u8 = b[i]; info2!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for ab in a.byte_iter() { info!("{}", i); info!("{}", ab); let bb: u8 = b[i]; info!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for ab in a.bytes() { info!("{}", i); info!("{}", ab); let bb: u8 = b[i]; info!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for ab in a.bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b[i]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = ~"འབྲུག་ཡུལ།"; let japan: ~str = ~"日本"; let uzbekistan: ~str = ~"Ўзбекистон"; let austria: ~str = ~"Österreich"; let bhutan_e: ~str = ~"\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d"; let japan_e: ~str = ~"\u65e5\u672c"; let uzbekistan_e: ~str = ~"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d"; let austria_e: ~str = ~"\u00d6sterreich"; let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for ab in a.bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b[i as uint]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: ~str = "འབྲུག་ཡུལ།".to_owned(); let japan: ~str = "日本".to_owned(); let uzbekistan: ~str = "Ўзбекистон".to_owned(); let austria: ~str = "Österreich".to_owned(); let bhutan_e: ~str = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d".to_owned(); let japan_e: ~str = "\u65e5\u672c".to_owned(); let uzbekistan_e: ~str = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d".to_owned(); let austria_e: ~str = "\u00d6sterreich".to_owned(); let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; for ab in a.bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b[i as uint]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: StrBuf = "འབྲུག་ཡུལ།".to_strbuf(); let japan: StrBuf = "日本".to_strbuf(); let uzbekistan: StrBuf = "Ўзбекистон".to_strbuf(); let austria: StrBuf = "Österreich".to_strbuf(); let bhutan_e: StrBuf = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d".to_strbuf(); let japan_e: StrBuf = "\u65e5\u672c".to_strbuf(); let uzbekistan_e: StrBuf = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d".to_strbuf(); let austria_e: StrBuf = "\u00d6sterreich".to_strbuf(); let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: StrBuf, b: StrBuf) { let mut i: int = 0; for ab in a.as_slice().bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_slice()[i as uint]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: String = "འབྲུག་ཡུལ།".to_strbuf(); let japan: String = "日本".to_strbuf(); let uzbekistan: String = "Ўзбекистон".to_strbuf(); let austria: String = "Österreich".to_strbuf(); let bhutan_e: String = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d".to_strbuf(); let japan_e: String = "\u65e5\u672c".to_strbuf(); let uzbekistan_e: String = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d".to_strbuf(); let austria_e: String = "\u00d6sterreich".to_strbuf(); let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: String, b: String) { let mut i: int = 0; for ab in a.as_slice().bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_slice()[i as uint]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: String = "འབྲུག་ཡུལ།".to_string(); let japan: String = "日本".to_string(); let uzbekistan: String = "Ўзбекистон".to_string(); let austria: String = "Österreich".to_string(); let bhutan_e: String = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d".to_string(); let japan_e: String = "\u65e5\u672c".to_string(); let uzbekistan_e: String = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d".to_string(); let austria_e: String = "\u00d6sterreich".to_string(); let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: String, b: String) { let mut i: int = 0; for ab in a.as_slice().bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_slice()[i as uint]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // ignore-pretty FIXME #15189 pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: String = "འབྲུག་ཡུལ།".to_string(); let japan: String = "日本".to_string(); let uzbekistan: String = "Ўзбекистон".to_string(); let austria: String = "Österreich".to_string(); let bhutan_e: String = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d".to_string(); let japan_e: String = "\u65e5\u672c".to_string(); let uzbekistan_e: String = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d".to_string(); let austria_e: String = "\u00d6sterreich".to_string(); let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: String, b: String) { let mut i: int = 0; for ab in a.as_slice().bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_slice()[i as uint]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // no-pretty-expanded FIXME #15189 pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: String = "འབྲུག་ཡུལ།".to_string(); let japan: String = "日本".to_string(); let uzbekistan: String = "Ўзбекистон".to_string(); let austria: String = "Österreich".to_string(); let bhutan_e: String = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d".to_string(); let japan_e: String = "\u65e5\u672c".to_string(); let uzbekistan_e: String = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d".to_string(); let austria_e: String = "\u00d6sterreich".to_string(); let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: String, b: String) { let mut i: int = 0; for ab in a.as_slice().bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_slice()[i as uint]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // no-pretty-expanded FIXME #15189 pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: String = "འབྲུག་ཡུལ།".to_string(); let japan: String = "日本".to_string(); let uzbekistan: String = "Ўзбекистон".to_string(); let austria: String = "Österreich".to_string(); let bhutan_e: String = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d".to_string(); let japan_e: String = "\u65e5\u672c".to_string(); let uzbekistan_e: String = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d".to_string(); let austria_e: String = "\u00d6sterreich".to_string(); let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: String, b: String) { let mut i: int = 0; for ab in a.as_slice().bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_bytes()[i as uint]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // // ignore-lexer-test FIXME #15679 // no-pretty-expanded FIXME #15189 pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: String = "འབྲུག་ཡུལ།".to_string(); let japan: String = "日本".to_string(); let uzbekistan: String = "Ўзбекистон".to_string(); let austria: String = "Österreich".to_string(); let bhutan_e: String = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d".to_string(); let japan_e: String = "\u65e5\u672c".to_string(); let uzbekistan_e: String = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d".to_string(); let austria_e: String = "\u00d6sterreich".to_string(); let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: String, b: String) { let mut i: int = 0; for ab in a.as_slice().bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_bytes()[i as uint]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // // ignore-lexer-test FIXME #15679 // no-pretty-expanded FIXME #15189 pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u03a0' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: String = "འབྲུག་ཡུལ།".to_string(); let japan: String = "日本".to_string(); let uzbekistan: String = "Ўзбекистон".to_string(); let austria: String = "Österreich".to_string(); let bhutan_e: String = "\u0f60\u0f56\u0fb2\u0f74\u0f42\u0f0b\u0f61\u0f74\u0f63\u0f0d".to_string(); let japan_e: String = "\u65e5\u672c".to_string(); let uzbekistan_e: String = "\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d".to_string(); let austria_e: String = "\u00d6sterreich".to_string(); let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: String, b: String) { let mut i: int = 0; for ab in a.bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_bytes()[i as uint]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // // ignore-lexer-test FIXME #15679 // no-pretty-expanded FIXME #15189 pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as int, 0xa5); assert_eq!(c_cedilla as int, 0xe7); assert_eq!(thorn as int, 0xfe); assert_eq!(y_diaeresis as int, 0xff); assert_eq!(pi as int, 0x3a0); assert_eq!(pi as int, '\u{3a0}' as int); assert_eq!('\x0a' as int, '\n' as int); let bhutan: String = "འབྲུག་ཡུལ།".to_string(); let japan: String = "日本".to_string(); let uzbekistan: String = "Ўзбекистон".to_string(); let austria: String = "Österreich".to_string(); let bhutan_e: String = "\u{f60}\u{f56}\u{fb2}\u{f74}\u{f42}\u{f0b}\u{f61}\u{f74}\u{f63}\u{f0d}".to_string(); let japan_e: String = "\u{65e5}\u{672c}".to_string(); let uzbekistan_e: String = "\u{40e}\u{437}\u{431}\u{435}\u{43a}\u{438}\u{441}\u{442}\u{43e}\u{43d}".to_string(); let austria_e: String = "\u{d6}sterreich".to_string(); let oo: char = 'Ö'; assert_eq!(oo as int, 0xd6); fn check_str_eq(a: String, b: String) { let mut i: int = 0; for ab in a.bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_bytes()[i as uint]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // // ignore-lexer-test FIXME #15679 // no-pretty-expanded FIXME #15189 pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as isize, 0xa5); assert_eq!(c_cedilla as isize, 0xe7); assert_eq!(thorn as isize, 0xfe); assert_eq!(y_diaeresis as isize, 0xff); assert_eq!(pi as isize, 0x3a0); assert_eq!(pi as isize, '\u{3a0}' as isize); assert_eq!('\x0a' as isize, '\n' as isize); let bhutan: String = "འབྲུག་ཡུལ།".to_string(); let japan: String = "日本".to_string(); let uzbekistan: String = "Ўзбекистон".to_string(); let austria: String = "Österreich".to_string(); let bhutan_e: String = "\u{f60}\u{f56}\u{fb2}\u{f74}\u{f42}\u{f0b}\u{f61}\u{f74}\u{f63}\u{f0d}".to_string(); let japan_e: String = "\u{65e5}\u{672c}".to_string(); let uzbekistan_e: String = "\u{40e}\u{437}\u{431}\u{435}\u{43a}\u{438}\u{441}\u{442}\u{43e}\u{43d}".to_string(); let austria_e: String = "\u{d6}sterreich".to_string(); let oo: char = 'Ö'; assert_eq!(oo as isize, 0xd6); fn check_str_eq(a: String, b: String) { let mut i: isize = 0; for ab in a.bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_bytes()[i as usize]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // // no-pretty-expanded FIXME #15189 pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as isize, 0xa5); assert_eq!(c_cedilla as isize, 0xe7); assert_eq!(thorn as isize, 0xfe); assert_eq!(y_diaeresis as isize, 0xff); assert_eq!(pi as isize, 0x3a0); assert_eq!(pi as isize, '\u{3a0}' as isize); assert_eq!('\x0a' as isize, '\n' as isize); let bhutan: String = "འབྲུག་ཡུལ།".to_string(); let japan: String = "日本".to_string(); let uzbekistan: String = "Ўзбекистон".to_string(); let austria: String = "Österreich".to_string(); let bhutan_e: String = "\u{f60}\u{f56}\u{fb2}\u{f74}\u{f42}\u{f0b}\u{f61}\u{f74}\u{f63}\u{f0d}".to_string(); let japan_e: String = "\u{65e5}\u{672c}".to_string(); let uzbekistan_e: String = "\u{40e}\u{437}\u{431}\u{435}\u{43a}\u{438}\u{441}\u{442}\u{43e}\u{43d}".to_string(); let austria_e: String = "\u{d6}sterreich".to_string(); let oo: char = 'Ö'; assert_eq!(oo as isize, 0xd6); fn check_str_eq(a: String, b: String) { let mut i: isize = 0; for ab in a.bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_bytes()[i as usize]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let yen: char = '¥'; // 0xa5 let c_cedilla: char = 'ç'; // 0xe7 let thorn: char = 'þ'; // 0xfe let y_diaeresis: char = 'ÿ'; // 0xff let pi: char = 'Π'; // 0x3a0 assert_eq!(yen as isize, 0xa5); assert_eq!(c_cedilla as isize, 0xe7); assert_eq!(thorn as isize, 0xfe); assert_eq!(y_diaeresis as isize, 0xff); assert_eq!(pi as isize, 0x3a0); assert_eq!(pi as isize, '\u{3a0}' as isize); assert_eq!('\x0a' as isize, '\n' as isize); let bhutan: String = "འབྲུག་ཡུལ།".to_string(); let japan: String = "日本".to_string(); let uzbekistan: String = "Ўзбекистон".to_string(); let austria: String = "Österreich".to_string(); let bhutan_e: String = "\u{f60}\u{f56}\u{fb2}\u{f74}\u{f42}\u{f0b}\u{f61}\u{f74}\u{f63}\u{f0d}".to_string(); let japan_e: String = "\u{65e5}\u{672c}".to_string(); let uzbekistan_e: String = "\u{40e}\u{437}\u{431}\u{435}\u{43a}\u{438}\u{441}\u{442}\u{43e}\u{43d}".to_string(); let austria_e: String = "\u{d6}sterreich".to_string(); let oo: char = 'Ö'; assert_eq!(oo as isize, 0xd6); fn check_str_eq(a: String, b: String) { let mut i: isize = 0; for ab in a.bytes() { println!("{}", i); println!("{}", ab); let bb: u8 = b.as_bytes()[i as usize]; println!("{}", bb); assert_eq!(ab, bb); i += 1; } } check_str_eq(bhutan, bhutan_e); check_str_eq(japan, japan_e); check_str_eq(uzbekistan, uzbekistan_e); check_str_eq(austria, austria_e); }