File: TransferMod.java

package info (click to toggle)
checker-framework-java 3.2.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 22,840 kB
  • sloc: java: 145,910; xml: 839; sh: 518; makefile: 401; perl: 26
file content (34 lines) | stat: -rw-r--r-- 863 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import org.checkerframework.checker.index.qual.GTENegativeOne;
import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.checker.index.qual.Positive;

class TransferMod {

    void test() {
        int aa = -100;
        int a = -1;
        int b = 0;
        int c = 1;
        int d = 2;

        @Positive int e = 5 % 3;
        @NonNegative int f = -100 % 1;

        @NonNegative int g = aa % -1;
        @NonNegative int h = aa % 1;
        @NonNegative int i = d % -1;
        @NonNegative int j = d % 1;

        @NonNegative int k = d % c;
        @NonNegative int l = b % c;
        @NonNegative int m = c % d;

        @NonNegative int n = c % a;
        @NonNegative int o = b % a;

        @GTENegativeOne int p = a % a;
        @GTENegativeOne int q = a % d;
        @GTENegativeOne int r = a % c;
    }
}
// a comment