]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/div-mod.rs
Un-revert "Use different syntax for checks that matter to typestate", fixing the...
[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   assert (x / 5 == 3);
7   assert (x / 4 == 3);
8   assert (x / 3 == 5);
9   assert (x / y == 3);
10   assert (15 / y == 3);
11
12   assert (x % 5 == 0);
13   assert (x % 4 == 3);
14   assert (x % 3 == 0);
15   assert (x % y == 0);
16   assert (15 % y == 0);
17 }