Added tests to WS around DIV and MOD. All multiplicative expressions are now covered.

This commit is contained in:
Lars Kühne 2002-01-15 06:04:46 +00:00
parent 3af1c99a0c
commit d7de3bef0b
2 changed files with 29 additions and 0 deletions

View File

@ -119,6 +119,14 @@ public class CheckerTest
filepath + ":102: '*' is not preceeded with whitespace.",
filepath + ":109: '!' is proceeded with whitespace.",
filepath + ":110: '~' is proceeded with whitespace.",
filepath + ":117: '%' is not preceeded with whitespace.",
filepath + ":118: '%' is not proceeded with whitespace.",
filepath + ":119: '%' is not preceeded with whitespace.",
filepath + ":119: '%' is not proceeded with whitespace.",
filepath + ":121: '/' is not preceeded with whitespace.",
filepath + ":122: '/' is not proceeded with whitespace.",
filepath + ":123: '/' is not preceeded with whitespace.",
filepath + ":123: '/' is not proceeded with whitespace.",
};
verify(c, filepath, expected);
}
@ -162,6 +170,14 @@ public class CheckerTest
filepath + ":102: '*' is not preceeded with whitespace.",
filepath + ":109: '!' is proceeded with whitespace.",
filepath + ":110: '~' is proceeded with whitespace.",
filepath + ":117: '%' is not preceeded with whitespace.",
filepath + ":118: '%' is not proceeded with whitespace.",
filepath + ":119: '%' is not preceeded with whitespace.",
filepath + ":119: '%' is not proceeded with whitespace.",
filepath + ":121: '/' is not preceeded with whitespace.",
filepath + ":122: '/' is not proceeded with whitespace.",
filepath + ":123: '/' is not preceeded with whitespace.",
filepath + ":123: '/' is not proceeded with whitespace.",
};
verify(c, filepath, expected);
}

View File

@ -109,4 +109,17 @@ class InputWhitespace
boolean x = ! a;
int z = ~1 + ~ 2;
}
/** division test **/
private void divTest()
{
int a = 4 % 2;
int b = 4% 2;
int c = 4 %2;
int d = 4%2;
int e = 4 / 2;
int f = 4/ 2;
int g = 4 /2;
int h = 4/2;
}
}