| Matthias Benkard | f3a3b30 | 2019-02-28 12:13:56 +0100 | [diff] [blame] | 1 | #![cfg(test)] |
| 2 | |||||
| 3 | use rust_tutorial::*; | ||||
| 4 | |||||
| 5 | #[test] | ||||
| 6 | fn integration_test_a() { | ||||
| 7 | assert_eq!("a", "a"); | ||||
| 8 | } | ||||
| 9 | |||||
| 10 | #[test] | ||||
| 11 | fn integration_test_b() { | ||||
| 12 | assert_eq!("b", "b"); | ||||
| 13 | } | ||||
| 14 | |||||
| 15 | #[test] | ||||
| 16 | fn integration_test_c() { | ||||
| 17 | let c = true; | ||||
| 18 | assert!(c); | ||||
| 19 | } | ||||
| 20 | |||||
| 21 | #[test] | ||||
| 22 | fn integration_test_d() { | ||||
| 23 | assert_ne!(0, 1); | ||||
| 24 | } | ||||
| 25 | |||||
| 26 | #[test] | ||||
| 27 | fn integration_test_e() { | ||||
| 28 | let p = Person { | ||||
| 29 | age: 30, | ||||
| 30 | name: "Mary".to_string(), | ||||
| 31 | }; | ||||
| 32 | assert_eq!(p.age, 30); | ||||
| 33 | } | ||||