MCPcopy Create free account
hub / github.com/Samsung/UTopia / TEST_F

Function TEST_F

tests/generation/TestUTModify.cpp:150–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148};
149
150TEST_F(TestUTModify, ModifyP) {
151 SourceFileManager SFM;
152 ASSERT_TRUE(SFM.createFile("library.h", "extern \"C\" {\n"
153 "void API_1(int);\n"
154 "void API_2(void *);\n"
155 "}"));
156 ASSERT_TRUE(SFM.createFile("library.cpp", "#include \"library.h\"\n"
157 "extern \"C\" {\n"
158 "void EXTERN_1(int);\n"
159 "void EXTERN_2(void *);\n"
160 "void API_1(int P) {\n"
161 " EXTERN_1(P);\n"
162 "}\n"
163 "void API_2(void *P) {\n"
164 " EXTERN_2(P);\n"
165 "}}"));
166 ASSERT_TRUE(SFM.createFile("ut.cpp",
167 "#include \"library.h\"\n"
168 "#include \"gtest/gtest.h\"\n"
169 "int SUB_1(int P);\n"
170 "namespace NS {\n"
171 "int GVar1;\n"
172 "int GVar2[10];\n"
173 "}\n"
174 "int GVar3;\n"
175 "int GVar4[10];\n"
176 "const int GVar5 = 0;\n"
177 "TEST(Test, Test) {\n"
178 " int Var1;\n"
179 " int *Var2;\n"
180 " char *Var3;\n"
181 " char **Var4;\n"
182 " const int Var5 = 0;\n"
183 " int Var6[10];\n"
184 " int Var7 = 10;\n"
185 " int Var8[3] = { 0, 1, 2 };\n"
186 " static int Var9 = 10;\n"
187 " API_1(Var1);\n"
188 " API_2(Var2);\n"
189 " API_2(Var3);\n"
190 " API_2(Var4);\n"
191 " API_2(Var6);\n"
192 " API_1(NS::GVar1);\n"
193 " API_2(NS::GVar2);\n"
194 " API_1(GVar3);\n"
195 " API_2(GVar4);\n"
196 " API_1(GVar5);\n"
197 " API_1(Var5);\n"
198 " API_1(Var7);\n"
199 " API_2(Var8);\n"
200 " API_1(Var9);\n"
201 " API_1(10);\n"
202 " API_1(SUB_1(GVar3));\n"
203 "}\n"
204 "int main(int argc, char **argv) {\n"
205 " ::testing::InitGoogleTest(&argc, argv);\n"
206 " return RUN_ALL_TESTS();\n"
207 "}\n"));

Callers

nothing calls this directly

Calls 2

createFileMethod · 0.45
getFilePathMethod · 0.45

Tested by

no test coverage detected