]>
Commit | Line | Data |
---|---|---|
1a4d82fc | 1 | // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT |
223e47cc LB |
2 | // file at the top-level directory of this distribution and at |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
1a4d82fc | 10 | // |
1a4d82fc JJ |
11 | |
12 | #![feature(non_ascii_idents)] | |
223e47cc LB |
13 | |
14 | pub fn main() { | |
1a4d82fc JJ |
15 | let ε = 0.00001f64; |
16 | let Π = 3.14f64; | |
223e47cc | 17 | let लंच = Π * Π + 1.54; |
1a4d82fc | 18 | assert!(((लंच - 1.54) - (Π * Π)).abs() < ε); |
970d7e83 | 19 | assert_eq!(საჭმელად_გემრიელი_სადილი(), 0); |
223e47cc LB |
20 | } |
21 | ||
c34b1796 | 22 | fn საჭმელად_გემრიელი_სადილი() -> isize { |
223e47cc LB |
23 | |
24 | // Lunch in several languages. | |
25 | ||
85aaf69f SL |
26 | let ランチ = 10; |
27 | let 午餐 = 10; | |
223e47cc | 28 | |
85aaf69f SL |
29 | let ארוחת_צהריי = 10; |
30 | let غداء = 10_usize; | |
31 | let լանչ = 10; | |
32 | let обед = 10; | |
33 | let абед = 10; | |
34 | let μεσημεριανό = 10; | |
35 | let hádegismatur = 10; | |
36 | let ручек = 10; | |
223e47cc | 37 | |
85aaf69f SL |
38 | let ăn_trưa = 10; |
39 | let อาหารกลางวัน = 10; | |
223e47cc LB |
40 | |
41 | // Lunchy arithmetic, mm. | |
42 | ||
970d7e83 | 43 | assert_eq!(hádegismatur * ручек * обед, 1000); |
85aaf69f | 44 | assert_eq!(10, ארוחת_צהריי); |
970d7e83 LB |
45 | assert_eq!(ランチ + 午餐 + μεσημεριανό, 30); |
46 | assert_eq!(ăn_trưa + อาหารกลางวัน, 20); | |
223e47cc LB |
47 | return (абед + լանչ) >> غداء; |
48 | } |