Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include test case FP/FN report #486

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
59 changes: 59 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,63 @@ 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;
};
Loading