diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-24 17:11:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-24 17:11:36 +0300 |
commit | 9514ce8536c3b1945b473c6373f41b467dea7c4a (patch) | |
tree | 9332cc6d5759c55484644f8094fe596c45cbe513 /test/test22.cpp | |
parent | c45f9b72e5182386b723f2d44a1417ccb69a20c8 (diff) | |
download | paranucker-9514ce8536c3b1945b473c6373f41b467dea7c4a.tar.gz paranucker-9514ce8536c3b1945b473c6373f41b467dea7c4a.tar.bz2 paranucker-9514ce8536c3b1945b473c6373f41b467dea7c4a.tar.xz paranucker-9514ce8536c3b1945b473c6373f41b467dea7c4a.zip |
Update test 22.
Diffstat (limited to 'test/test22.cpp')
-rw-r--r-- | test/test22.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test22.cpp b/test/test22.cpp index f818390..6917105 100644 --- a/test/test22.cpp +++ b/test/test22.cpp @@ -1,3 +1,4 @@ +#include <string> #include <vector> struct Data1; @@ -15,6 +16,8 @@ struct Data1 int val; Data1 *ptrval; + int arr[3]; + std::string str1; int ftest1() { @@ -75,4 +78,22 @@ class Object1 return; } } + void func8(Data1 *const ptr1) + { + if (!ptr1 || ptr1->val == 3 || !ptr1->ptrval) + return; + + const int k = ptr1->arr[0]; + + int test1 = ptr1->val; + } + +void func9(Data1 *const chunk) +{ + if (!chunk || chunk->str1.empty()) + return; + chunk->str1[0]; +} + }; + |