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

Function TEST

tests/constantanalysis/TestConstAnalyzerReport.cpp:14–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using namespace ftg;
13
14TEST(TestConstantAnalyerReport, SerializeP) {
15 auto AST =
16 clang::tooling::buildASTFromCode("const int IntConst = 1;"
17 "int IntVar = 1;"
18 "const double DoubleConst = 1.5;");
19 std::vector<clang::ASTUnit *> ASTUnits;
20 ASTUnits.push_back(AST.get());
21 ConstAnalyzer Analyzer(ASTUnits);
22 auto Report = Analyzer.getReport();
23 auto JsonReport = Report->toJson();
24
25 auto JsonStr = JsonReport.toStyledString();
26 ApprovalTests::Approvals::verify(JsonStr);
27}
28
29TEST(TestConstantAnalyerReport, DeserializeP) {
30 Json::Value Root;

Callers

nothing calls this directly

Calls 6

toStyledStringMethod · 0.80
getConstValueMethod · 0.80
getMethod · 0.45
getReportMethod · 0.45
toJsonMethod · 0.45
fromJsonMethod · 0.45

Tested by

no test coverage detected