diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-02 13:02:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-02 13:02:43 +0300 |
commit | ac179932fea5244a18547fffa5eb7f086afd3c08 (patch) | |
tree | b5a5a20afebc82bb1d595f7d8f664c170336a958 /tests/testsrc/bad | |
parent | 606bfb6b8c54fa786617f6cdf8da5679b1ecde64 (diff) | |
download | mplint-ac179932fea5244a18547fffa5eb7f086afd3c08.tar.gz mplint-ac179932fea5244a18547fffa5eb7f086afd3c08.tar.bz2 mplint-ac179932fea5244a18547fffa5eb7f086afd3c08.tar.xz mplint-ac179932fea5244a18547fffa5eb7f086afd3c08.zip |
Add test and code with errors.
Diffstat (limited to 'tests/testsrc/bad')
-rw-r--r-- | tests/testsrc/bad/constructor1.cpp | 48 | ||||
-rw-r--r-- | tests/testsrc/bad/constructor1.h | 46 | ||||
-rw-r--r-- | tests/testsrc/bad/debug1.cpp | 25 | ||||
-rw-r--r-- | tests/testsrc/bad/debug1.h | 27 | ||||
-rw-r--r-- | tests/testsrc/bad/debug2.cpp | 27 | ||||
-rw-r--r-- | tests/testsrc/bad/final1.cpp | 33 | ||||
-rw-r--r-- | tests/testsrc/bad/final1.h | 29 | ||||
-rw-r--r-- | tests/testsrc/bad/license1.cpp | 27 | ||||
-rw-r--r-- | tests/testsrc/bad/license1.h | 25 | ||||
-rw-r--r-- | tests/testsrc/bad/license2.cpp | 27 | ||||
-rw-r--r-- | tests/testsrc/bad/license2.h | 25 | ||||
-rw-r--r-- | tests/testsrc/bad/license3.cpp | 27 | ||||
-rw-r--r-- | tests/testsrc/bad/license3.h | 25 | ||||
-rw-r--r-- | tests/testsrc/bad/license4.cpp | 27 | ||||
-rw-r--r-- | tests/testsrc/bad/license4.h | 25 | ||||
-rw-r--r-- | tests/testsrc/bad/license5.cpp | 26 | ||||
-rw-r--r-- | tests/testsrc/bad/license5.h | 24 | ||||
-rw-r--r-- | tests/testsrc/bad/license6.cpp | 27 | ||||
-rw-r--r-- | tests/testsrc/bad/license6.h | 25 |
19 files changed, 545 insertions, 0 deletions
diff --git a/tests/testsrc/bad/constructor1.cpp b/tests/testsrc/bad/constructor1.cpp new file mode 100644 index 0000000..4d19fe5 --- /dev/null +++ b/tests/testsrc/bad/constructor1.cpp @@ -0,0 +1,48 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +#include "debug.h" + +class Test1 +{ + Test1::Test1() + { + } +} + +struct Test2 +{ + Test2::Test2(): + data1(), + data2() + { + } +} + +struct Test3 +{ + Test3::Test3() : + data1(), + data2() + { + } +} diff --git a/tests/testsrc/bad/constructor1.h b/tests/testsrc/bad/constructor1.h new file mode 100644 index 0000000..a61f0d9 --- /dev/null +++ b/tests/testsrc/bad/constructor1.h @@ -0,0 +1,46 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +class Test1 +{ + Test1::Test1() + { + } +} + +struct Test2 +{ + Test2::Test2(): + data1(), + data2() + { + } +} + +struct Test3 +{ + Test3::Test3() : + data1(), + data2() + { + } +} diff --git a/tests/testsrc/bad/debug1.cpp b/tests/testsrc/bad/debug1.cpp new file mode 100644 index 0000000..d96a5f4 --- /dev/null +++ b/tests/testsrc/bad/debug1.cpp @@ -0,0 +1,25 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/debug1.h b/tests/testsrc/bad/debug1.h new file mode 100644 index 0000000..b6812d4 --- /dev/null +++ b/tests/testsrc/bad/debug1.h @@ -0,0 +1,27 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +#include "debug.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/debug2.cpp b/tests/testsrc/bad/debug2.cpp new file mode 100644 index 0000000..f442b98 --- /dev/null +++ b/tests/testsrc/bad/debug2.cpp @@ -0,0 +1,27 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "debug.h" + +#include "lintmanager.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/final1.cpp b/tests/testsrc/bad/final1.cpp new file mode 100644 index 0000000..3e17bb2 --- /dev/null +++ b/tests/testsrc/bad/final1.cpp @@ -0,0 +1,33 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +#include "debug.h" + +class Test1 +{ + Test1(); +} + +class Test2 : public Test1 +{ + Test2(); +} diff --git a/tests/testsrc/bad/final1.h b/tests/testsrc/bad/final1.h new file mode 100644 index 0000000..9ced5ae --- /dev/null +++ b/tests/testsrc/bad/final1.h @@ -0,0 +1,29 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +class Test1 +{ +} + +class Test2 : public Test1 +{ +} diff --git a/tests/testsrc/bad/license1.cpp b/tests/testsrc/bad/license1.cpp new file mode 100644 index 0000000..8378e48 --- /dev/null +++ b/tests/testsrc/bad/license1.cpp @@ -0,0 +1,27 @@ +/*** + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +#include "debug.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/license1.h b/tests/testsrc/bad/license1.h new file mode 100644 index 0000000..d492616 --- /dev/null +++ b/tests/testsrc/bad/license1.h @@ -0,0 +1,25 @@ +/*** + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/license2.cpp b/tests/testsrc/bad/license2.cpp new file mode 100644 index 0000000..f27871f --- /dev/null +++ b/tests/testsrc/bad/license2.cpp @@ -0,0 +1,27 @@ +/* + * The anaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +#include "debug.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/license2.h b/tests/testsrc/bad/license2.h new file mode 100644 index 0000000..05977b3 --- /dev/null +++ b/tests/testsrc/bad/license2.h @@ -0,0 +1,25 @@ +/* + * The anaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/license3.cpp b/tests/testsrc/bad/license3.cpp new file mode 100644 index 0000000..b55e807 --- /dev/null +++ b/tests/testsrc/bad/license3.cpp @@ -0,0 +1,27 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +#include "debug.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/license3.h b/tests/testsrc/bad/license3.h new file mode 100644 index 0000000..903460a --- /dev/null +++ b/tests/testsrc/bad/license3.h @@ -0,0 +1,25 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/license4.cpp b/tests/testsrc/bad/license4.cpp new file mode 100644 index 0000000..09e87b0 --- /dev/null +++ b/tests/testsrc/bad/license4.cpp @@ -0,0 +1,27 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +#include "debug.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/license4.h b/tests/testsrc/bad/license4.h new file mode 100644 index 0000000..89071d9 --- /dev/null +++ b/tests/testsrc/bad/license4.h @@ -0,0 +1,25 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/license5.cpp b/tests/testsrc/bad/license5.cpp new file mode 100644 index 0000000..807835a --- /dev/null +++ b/tests/testsrc/bad/license5.cpp @@ -0,0 +1,26 @@ +/* + * The ManaPlus Client + * aaaaaaaaa + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +#include "debug.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/license5.h b/tests/testsrc/bad/license5.h new file mode 100644 index 0000000..b89ac84 --- /dev/null +++ b/tests/testsrc/bad/license5.h @@ -0,0 +1,24 @@ +/* + * The ManaPlus Client + * bbbbbbbbb + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/license6.cpp b/tests/testsrc/bad/license6.cpp new file mode 100644 index 0000000..32946a1 --- /dev/null +++ b/tests/testsrc/bad/license6.cpp @@ -0,0 +1,27 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * file is part of + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +#include "debug.h" + +void func() +{ +} diff --git a/tests/testsrc/bad/license6.h b/tests/testsrc/bad/license6.h new file mode 100644 index 0000000..d36ff19 --- /dev/null +++ b/tests/testsrc/bad/license6.h @@ -0,0 +1,25 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * file is part of + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "lintmanager.h" + +void func() +{ +} |