Skip to content

Commit 7b1bbbc

Browse files
Update testother.cpp
1 parent d810f11 commit 7b1bbbc

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/testother.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13284,6 +13284,13 @@ class TestOther : public TestFixture {
1328413284
" if (j % c) {}\n"
1328513285
"}\n");
1328613286
ASSERT_EQUALS("", errout_str());
13287+
13288+
check("void f() {\n"
13289+
" int i = 0;\n"
13290+
" i %= 1;\n"
13291+
" (void)i;\n"
13292+
"}\n");
13293+
ASSERT_EQUALS("[test.cpp:3:7]: (style) Modulo of one is always equal to zero [moduloofone]\n", errout_str());
1328713294
}
1328813295

1328913296
void sameExpressionPointers() {

0 commit comments

Comments
 (0)