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

Function TEST_F

tests/inputanalysis/TestInputAnalysisReport.cpp:50–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48};
49
50TEST_F(TestInputAnalysisReport, fromJsonP) {
51 const std::string Code = "#include <gtest/gtest.h>\n"
52 "extern \"C\" {\n"
53 "void API1(int);\n"
54 "TEST(Test, Test) {\n"
55 " int Var1 = 1;\n"
56 " API1(Var1);\n"
57 "}"
58 "}";
59 SourceFileManager SFM;
60 SFM.createFile("test.cpp", Code);
61 ASSERT_TRUE(init(SFM.getSrcDirPath(), SFM.getFilePath("test.cpp"), {"API1"}));
62
63 InputAnalysisReport NewInputReport;
64 TypeAnalysisReport EmptyTypeReport;
65 auto SerializedReport = Analyzer->get().toJson();
66 NewInputReport.fromJson(SerializedReport, EmptyTypeReport);
67 ASSERT_EQ(SerializedReport, NewInputReport.toJson());
68}
69
70TEST_F(TestInputAnalysisReport, fromJsonN) {
71 InputAnalysisReport Report;

Callers

nothing calls this directly

Calls 7

ASSERT_DEATHFunction · 0.85
getSrcDirPathMethod · 0.80
createFileMethod · 0.45
getFilePathMethod · 0.45
toJsonMethod · 0.45
getMethod · 0.45
fromJsonMethod · 0.45

Tested by

no test coverage detected