]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/div-mod.rs
Populate tree.
[rust.git] / src / test / run-pass / div-mod.rs
1 // -*- rust -*-
2
3 fn main() {
4   let int x = 15;
5   let int y = 5;
6   check(x / 5 == 3);
7   check(x / 4 == 3);
8   check(x / 3 == 5);
9   check(x / y == 3);
10   check(15 / y == 3);
11
12   check(x % 5 == 0);
13   check(x % 4 == 3);
14   check(x % 3 == 0);
15   check(x % y == 0);
16   check(15 % y == 0);
17 }