Skip to content

Commit

Permalink
Include test case FP/FN report
Browse files Browse the repository at this point in the history
  • Loading branch information
rvermeulen committed Jan 12, 2024
1 parent d9f0911 commit 41fdf07
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
| test.cpp:12:7:12:8 | C3 | Class $@ has provided at least one user-defined special member function but is missing definitions for all five special member functions. | test.cpp:12:7:12:8 | C3 | C3 |
| test.cpp:28:7:28:8 | C5 | Class $@ has provided at least one user-defined special member function but is missing definitions for all five special member functions. | test.cpp:28:7:28:8 | C5 | C5 |
| test.cpp:51:7:51:9 | C10 | Class $@ has provided at least one user-defined special member function but is missing definitions for all five special member functions. | test.cpp:51:7:51:9 | C10 | C10 |
| test.cpp:55:7:55:9 | C11 | Class $@ has provided at least one user-defined special member function but is missing definitions for all five special member functions. | test.cpp:55:7:55:9 | C11 | C11 |
| test.cpp:59:7:59:9 | C12 | Class $@ has provided at least one user-defined special member function but is missing definitions for all five special member functions. | test.cpp:59:7:59:9 | C12 | C12 |
| test.cpp:63:7:63:9 | C13 | Class $@ has provided at least one user-defined special member function but is missing definitions for all five special member functions. | test.cpp:63:7:63:9 | C13 | C13 |
| test.cpp:67:7:67:9 | C14 | Class $@ has provided at least one user-defined special member function but is missing definitions for all five special member functions. | test.cpp:67:7:67:9 | C14 | C14 |
| test.cpp:71:7:71:9 | C15 | Class $@ has provided at least one user-defined special member function but is missing definitions for all five special member functions. | test.cpp:71:7:71:9 | C15 | C15 |
61 changes: 61 additions & 0 deletions cpp/autosar/test/rules/A12-0-1/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,65 @@ struct C7::C8 { // COMPLIANT
struct C9 { // COMPLIANT
C9() {}
C9(int x) {}
};

class C10 {
~C10() = default; // NON_COMPLIANT
};

class C11 {
~C11() = delete; // NON_COMPLIANT
};

class C12 {
C12(C12 const &); // NON_COMPLIANT
};

class C13 {
C13(C13 const &) = default; // NON_COMPLIANT
};

class C14 {
C14(C14 const &) = delete; // NON_COMPLIANT
};

class C15 {
C15& operator=(C15 const &); // NON_COMPLIANT
};

template<typename T>
class C16 { // COMPLIANT
C16() = default;};

template<typename T>
class C17 { // COMPLIANT
C17() = default;
C17(C17 const &) = default;
C17(C17 &&) = default;
virtual ~C17() = default;
C17 &operator=(C17 const &) = default;
C17 &operator=(C17 &&) = default;
};

template<typename T>
class C18 { // COMPLIANT
C18() = default;
C18(C18 const &) = delete;
C18(C18 &&) = delete;
virtual ~C18() = default;
C18 &operator=(C18 const &) = delete;
C18 &operator=(C18 &&) = delete;
};

template<typename T>
class C19 { // COMPLIANT
public:
explicit C19(T i) : i(i) {}
C19(C19 const &) = delete;
C19(C19 &&) = delete;
virtual ~C19() = default;
C19 &operator=(C19 const &) = delete;
C19 &operator=(C19 &&) = delete;
private:
T i;
};

0 comments on commit 41fdf07

Please sign in to comment.