aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2020-07-14 15:30:12 +0000
committerbloodstalker <thabogre@gmail.com>2020-07-14 15:30:12 +0000
commit835b5ba3d6594a60963af89b0487f89afe6e19f1 (patch)
tree733fbda827f60ae4d35128605fbef3679f33b05e /test
parentadded a new switch:recorddecl. the test script is still WIP. (diff)
downloadcgrep-835b5ba3d6594a60963af89b0487f89afe6e19f1.tar.gz
cgrep-835b5ba3d6594a60963af89b0487f89afe6e19f1.zip
wip-tests
Diffstat (limited to 'test')
-rw-r--r--test/declrefexpr.cpp8
-rw-r--r--test/fielddecl.cpp6
-rw-r--r--test/function.cpp6
-rw-r--r--test/test_list.md32
-rw-r--r--test/vardecl.cpp8
5 files changed, 30 insertions, 30 deletions
diff --git a/test/declrefexpr.cpp b/test/declrefexpr.cpp
index c184577..b2a617d 100644
--- a/test/declrefexpr.cpp
+++ b/test/declrefexpr.cpp
@@ -4,7 +4,7 @@ namespace declrefexpr_ns{
class testClass {
public:
testClass() = default;
- int a;
+ int testa;
private:
};
@@ -12,9 +12,9 @@ private:
int __attribute__((weak)) main(int argc, char *argv[]) {
int a;
- int b;
+ int testb;
declrefexpr_ns::testClass tc;
- tc.a = 10;
+ tc.testa = 10;
- return a + b;
+ return a + testb;
}
diff --git a/test/fielddecl.cpp b/test/fielddecl.cpp
index 6646afd..82f5d1f 100644
--- a/test/fielddecl.cpp
+++ b/test/fielddecl.cpp
@@ -4,12 +4,12 @@ namespace fielddecl_ns{
struct testStruct {
int fieldone;
- float fieldtwo;
+ float testfieldtwo;
int fieldmacro;
};
union testUnion {
- int fieldone;
+ int testfieldone;
bool fieldtwo;
};
@@ -18,7 +18,7 @@ public:
testClass(void);
virtual ~testClass();
- void myMethod(void);
+ void testMethod(void);
private:
int an_arg;
diff --git a/test/function.cpp b/test/function.cpp
index 83878e7..bb0f228 100644
--- a/test/function.cpp
+++ b/test/function.cpp
@@ -1,6 +1,6 @@
namespace function_ns{
-void MyFunc(void) { return; }
+void testMyFunc(void) { return; }
class yolo {
public:
@@ -8,7 +8,7 @@ public:
yolo(int a) : a(a) {}
virtual ~yolo();
- void yolofunc(void) { return; }
+ void testyolofunc(void) { return; }
private:
int a;
@@ -16,5 +16,5 @@ private:
#define MFunc macroedFunc
-void MFunc(void) { return; }
+void testFunc(void) { return; }
} // namespace
diff --git a/test/test_list.md b/test/test_list.md
index e39ea5e..39b2f02 100644
--- a/test/test_list.md
+++ b/test/test_list.md
@@ -1,22 +1,22 @@
## Test List
-- [x] function declaration
-- [x] field declratation
-- [x] cxx method declaration
-- [x] variable declaration
-- [x] class declaration
-- [x] struct declaration
-- [x] union declaration/definition
-- [x] named declaration/definition
-- [x] declaration reference expression
-- [x] call expression
-- [x] cxx member call expression
-- [x] cxx record declaration
-- [] macro definition
-- [] header inclusion directive
+- [x] function declaration
+- [x] field declratation
+- [x] cxx method declaration
+- [x] variable declaration
+- [x] class declaration
+- [x] struct declaration
+- [x] union declaration/definition
+- [x] named declaration/definition
+- [x] declaration reference expression
+- [x] call expression
+- [x] cxx member call expression
+- [x] cxx record declaration
+- [] macro definition
+- [] header inclusion directive
## Cross Test List
-* macro expansion behaviour
-* overload
+- macro expansion behaviour
+- overload
diff --git a/test/vardecl.cpp b/test/vardecl.cpp
index 3f17a21..8bce877 100644
--- a/test/vardecl.cpp
+++ b/test/vardecl.cpp
@@ -1,21 +1,21 @@
namespace vardecl_ns{
-int a;
+int gtesta;
int testFunction(int a, int b);
int testFunction(int a, int b) { return a + b; }
class testClass {
public:
- testClass(int a) : a(a) {}
+ testClass(int a) : testa(a) {}
virtual ~testClass();
void cxxMethod(double a) {}
private:
- int a;
+ int testa;
};
#define vardeclmacro varDeclMacroExpanded
-int vardeclmacro;
+int testvardeclmacro;
}; // namespace