]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/div-mod.rs
Reformat source tree (minus a couple tests that are still grumpy).
[rust.git] / src / test / run-pass / div-mod.rs
1
2
3
4 // -*- rust -*-
5 fn main() {
6     let int x = 15;
7     let int y = 5;
8     assert (x / 5 == 3);
9     assert (x / 4 == 3);
10     assert (x / 3 == 5);
11     assert (x / y == 3);
12     assert (15 / y == 3);
13     assert (x % 5 == 0);
14     assert (x % 4 == 3);
15     assert (x % 3 == 0);
16     assert (x % y == 0);
17     assert (15 % y == 0);
18 }