diff --git a/src/tests/com/puppycrawl/tools/checkstyle/CheckerTest.java b/src/tests/com/puppycrawl/tools/checkstyle/CheckerTest.java index 90d2925b2..593d95a71 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/CheckerTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/CheckerTest.java @@ -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); } diff --git a/src/tests/com/puppycrawl/tools/checkstyle/InputWhitespace.java b/src/tests/com/puppycrawl/tools/checkstyle/InputWhitespace.java index 393553f60..9c73a005c 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/InputWhitespace.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/InputWhitespace.java @@ -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; + } }