javaclass

Changeset

81:2e78d10e4a35
2004-12-09 Paul Boddie raw files shortlog changelog graph Added a simple comparison test.
tests/ComparisonTest.java (file)
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tests/ComparisonTest.java	Thu Dec 09 02:18:13 2004 +0100
     1.3 @@ -0,0 +1,26 @@
     1.4 +public class ComparisonTest {
     1.5 +
     1.6 +    public boolean equals(int x, int y) {
     1.7 +        if (x == y) {
     1.8 +            return true;
     1.9 +        } else {
    1.10 +            return false;
    1.11 +        }
    1.12 +    }
    1.13 +
    1.14 +    public boolean lessThan(int x, int y) {
    1.15 +        if (x < y) {
    1.16 +            return true;
    1.17 +        } else {
    1.18 +            return false;
    1.19 +        }
    1.20 +    }
    1.21 +
    1.22 +    public boolean greaterThan(int x, int y) {
    1.23 +        if (x > y) {
    1.24 +            return true;
    1.25 +        } else {
    1.26 +            return false;
    1.27 +        }
    1.28 +    }
    1.29 +}