Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit23be3db

Browse files
committed
More test case formatting
1 parent3186c70 commit23be3db

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

‎cpp/misra/test/rules/RULE-7-0-4/test.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ void test_binary_bitwise_operators_unsigned_operands() {
77
std::int32_t s32a =0x12345678;
88
std::int32_t s32b =0x87654321;
99

10-
u32a &u32b;// COMPLIANT
10+
u32a &u32b;// COMPLIANT
1111
u32a | u32b;// COMPLIANT
1212
u32a ^ u32b;// COMPLIANT
1313

14-
s32a &s32b;// NON_COMPLIANT
14+
s32a &s32b;// NON_COMPLIANT
1515
s32a | s32b;// NON_COMPLIANT
1616
s32a ^ s32b;// NON_COMPLIANT
1717

18-
s32a &u32b;// NON_COMPLIANT
18+
s32a &u32b;// NON_COMPLIANT
1919
u32a | s32b;// NON_COMPLIANT
2020
}
2121

‎cpp/misra/test/rules/RULE-7-0-5/test.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void test_binary_arithmetic_operations() {
2424
l1 - l2;// NON_COMPLIANT - u8 - u8 -> signed int
2525
l1 / l2;// NON_COMPLIANT - u8 / u8 -> signed int
2626
l1 % l2;// NON_COMPLIANT - u8 % u8 -> signed int
27-
l1 &l2;// NON_COMPLIANT - u8 & u8 -> signed int
27+
l1 &l2;// NON_COMPLIANT - u8 & u8 -> signed int
2828
l1 | l2;// NON_COMPLIANT - u8 | u8 -> signed int
2929
l1 ^ l2;// NON_COMPLIANT - u8 ^ u8 -> signed int
3030

@@ -166,7 +166,7 @@ void test_mixed_signed_unsigned_arithmetic() {
166166
l1 *l2;// NON_COMPLIANT - l1 and l2 -> signed int
167167
l1 / l2;// NON_COMPLIANT - l1 and l2 -> signed int
168168
l1 % l2;// NON_COMPLIANT - l1 and l2 -> signed int
169-
l1 &l2;// NON_COMPLIANT - l1 and l2 -> signed int
169+
l1 &l2;// NON_COMPLIANT - l1 and l2 -> signed int
170170
l1 | l2;// NON_COMPLIANT - l1 and l2 -> signed int
171171
l1 ^ l2;// NON_COMPLIANT - l1 and l2 -> signed int
172172

@@ -264,12 +264,12 @@ void test_enum_types() {
264264
// type
265265
l1 + l2;// COMPLIANT - rule does not apply
266266
l1 *l2;// COMPLIANT - rule does not apply
267-
l1 &l2;// COMPLIANT - rule does not apply
267+
l1 &l2;// COMPLIANT - rule does not apply
268268

269269
// Unscoped enum with explicit underlying type - considered numeric type
270270
l3 + l4;// NON_COMPLIANT - uint8_t + uint8_t -> signed int
271271
l3 *l4;// NON_COMPLIANT - uint8_t * uint8_t -> signed int
272-
l3 &l4;// NON_COMPLIANT - uint8_t & uint8_t -> signed int
272+
l3 &l4;// NON_COMPLIANT - uint8_t & uint8_t -> signed int
273273
l3 - l4;// NON_COMPLIANT - uint8_t - uint8_t -> signed int
274274
l3 | l4;// NON_COMPLIANT - uint8_t | uint8_t -> signed int
275275
l3 ^ l4;// NON_COMPLIANT - uint8_t ^ uint8_t -> signed int

‎cpp/misra/test/rules/RULE-7-0-6/test_operators.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ void test_user_defined_operators() {
119119
l1 % l4;// NON_COMPLIANT - different type
120120
l1 % l5;// NON_COMPLIANT - different signedness
121121

122-
l1 &l2;// COMPLIANT - exact type match
123-
l1 &l3;// COMPLIANT - widening conversion is allowed
124-
l1 &l4;// NON_COMPLIANT - different type
125-
l1 &l5;// NON_COMPLIANT - different signedness
122+
l1 &l2;// COMPLIANT - exact type match
123+
l1 &l3;// COMPLIANT - widening conversion is allowed
124+
l1 &l4;// NON_COMPLIANT - different type
125+
l1 &l5;// NON_COMPLIANT - different signedness
126126

127127
l1 | l2;// COMPLIANT - exact type match
128128
l1 | l3;// COMPLIANT - widening conversion is allowed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp