From e0ddf2b95c7577c1b3d2e2b10145b87731f65e00 Mon Sep 17 00:00:00 2001 From: xinyan Date: Wed, 20 Feb 2019 00:01:10 +0800 Subject: [PATCH] Fix unit test baseline of cpp_test_repo. --- persper/analytics/lsp_graph_server/README.md | 7 +- .../baseline/cpp_test_repo/A.g.json | 182 +++++++++++----- .../baseline/cpp_test_repo/B.g.json | 196 ++++++++++++----- .../baseline/cpp_test_repo/C.g.json | 201 ++++++++++++----- .../baseline/cpp_test_repo/D.g.json | 206 +++++++++++++----- 5 files changed, 580 insertions(+), 212 deletions(-) diff --git a/persper/analytics/lsp_graph_server/README.md b/persper/analytics/lsp_graph_server/README.md index 91e01216e45..df961faf602 100644 --- a/persper/analytics/lsp_graph_server/README.md +++ b/persper/analytics/lsp_graph_server/README.md @@ -18,7 +18,12 @@ To try out the graph server backed by LSP, especially the [ccls](https://github. * Open a shell under `/test/test_analytics`, run ```powershell + # run all of the tests pipenv run pytest test_analyzer_lsp_ccls.py + # or run a single test + pipenv run pytest test_analyzer_lsp_ccls.py::testFeatureBranch ``` - * The test results are compared against baseline (by commit) in `/test/test_analytics/baseline`. \ No newline at end of file + * The test results are compared against baseline (by commit) in `/test/test_analytics/baseline`. + + * If there are assertion errors during testing, you can see the actual run result in `/test/test_analytics/actualdump`. \ No newline at end of file diff --git a/test/test_analytics/baseline/cpp_test_repo/A.g.json b/test/test_analytics/baseline/cpp_test_repo/A.g.json index 2bd1b9aacb1..019e2272079 100644 --- a/test/test_analytics/baseline/cpp_test_repo/A.g.json +++ b/test/test_analytics/baseline/cpp_test_repo/A.g.json @@ -1,50 +1,102 @@ { "edges": { - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)|->|bool Equal(const int &lhs, const int &rhs, int comparision)": { + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)|->|TStream OpenAndValidate(const TPath arg1)": { "addedBy": "A", "weight": null }, - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)|->|enum class StringComparison : int {}": { + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)|->|void ConfigurationParser::Load(std::istream &inputStream)": { "addedBy": "A", "weight": null }, - "bool Equal(const int &lhs, const int &rhs, int comparision)|->|enum class StringComparison : int {}": { + "ConfigurationParser::ConfigurationParser(std::istream &inputStream)|->|void ConfigurationParser::Load(std::istream &inputStream)": { "addedBy": "A", "weight": null }, - "const char *FriendlyNameOf(const ReliabilityNetworkEntry &instance)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { "addedBy": "A", "weight": null }, - "const char *FriendlyNameOf(const std::type_index &type)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { "addedBy": "A", "weight": null }, - "const char *FriendlyNameOf(const type_info &type)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|enum class StringComparison : int {}": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, double &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, double &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, float &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, float &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, int &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, long &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, long &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|bool Equal(const int &lhs, const int &rhs, int comparision)": { + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|enum class StringComparison : int {}": { + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|enum class StringComparison : int {}": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, double &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "bool Confirm(const std::string &prompt)|->|bool Confirm(const std::string &prompt)": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, float &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, long &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)|->|enum class StringComparison : int {}": { + "addedBy": "A", + "weight": null + }, + "const char *FriendlyNameOf(const ReliabilityNetworkEntry &instance)|->|const char *FriendlyNameOf()": { + "addedBy": "A", + "weight": null + }, + "const char *FriendlyNameOf(const std::type_index &type)|->|const char *FriendlyNameOf()": { + "addedBy": "A", + "weight": null + }, + "const char *FriendlyNameOf(const type_info &type)|->|const char *FriendlyNameOf()": { + "addedBy": "A", + "weight": null + }, + "double ConfigurationParser::GetDouble(const std::string &key, double defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { + "addedBy": "A", + "weight": null + }, + "int ConfigurationParser::GetInt(const std::string &key, int defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "addedBy": "A", "weight": null }, @@ -52,7 +104,15 @@ "addedBy": "A", "weight": null }, - "void ReportException(const int &ex, int level)|->|void ReportException(const int &ex, int level)": { + "int main(int argc, char *argv[])|->|bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const": { + "addedBy": "A", + "weight": null + }, + "void ConfigurationParser::Load(std::istream &inputStream)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "A", + "weight": null + }, + "void ReportException(const std::exception &ex, int level)|->|void ReportException(const std::exception &ex, int level)": { "addedBy": "A", "weight": null } @@ -106,33 +166,51 @@ }, "size": null }, + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)": { + "history": { + "A": 5 + }, + "size": null + }, + "ConfigurationParser::ConfigurationParser(std::istream &inputStream)": { + "history": { + "A": 4 + }, + "size": null + }, "RowReader &operator>>(RowReader &reader, bool &rhs)": { "history": { - "A": 1 + "A": 25 }, "size": null }, "RowReader &operator>>(RowReader &reader, double &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, float &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, int &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, long &rhs)": { "history": { - "A": 1 + "A": 7 + }, + "size": null + }, + "RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "history": { + "A": 17 }, "size": null }, @@ -142,6 +220,18 @@ }, "size": null }, + "TEnum operator&(TEnum lhs, TEnum rhs)": { + "history": { + "A": 1 + }, + "size": null + }, + "TEnum operator|(TEnum lhs, TEnum rhs)": { + "history": { + "A": 1 + }, + "size": null + }, "TStream &operator>>(TStream &s, RowReader &reader)": { "history": { "A": 1 @@ -172,7 +262,7 @@ }, "size": null }, - "_RangeToEnumerable RangeToEnumerable(const int range)": { + "_RangeToEnumerable RangeToEnumerable(const std::pair range)": { "history": { "A": 1 }, @@ -184,21 +274,21 @@ }, "size": null }, - "bool Confirm(const int &prompt)": { + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const": { "history": { - "A": 17 + "A": 16 }, "size": null }, - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)": { + "bool Confirm(const std::string &prompt)": { "history": { - "A": 1 + "A": 18 }, "size": null }, - "bool Equal(const int &lhs, const int &rhs, int comparision)": { + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { "history": { - "A": 29 + "A": 30 }, "size": null }, @@ -208,7 +298,7 @@ }, "size": null }, - "bool pointer_kind_of(const int obj)": { + "bool pointer_kind_of(const std::shared_ptr obj)": { "history": { "A": 1 }, @@ -238,67 +328,61 @@ }, "size": null }, - "enum class StringComparison : int {}": { + "double ConfigurationParser::GetDouble(const std::string &key, double defaultValue) const": { "history": { - "A": 6 + "A": 12 }, "size": null }, - "inline int to_string(const int &value)": { + "enum class StringComparison : int {}": { "history": { - "A": 4 + "A": 6 }, "size": null }, - "int &operator>>(int &reader, bool &rhs)": { + "inline std::string to_string(const std::pair &value)": { "history": { - "A": 24 + "A": 4 }, "size": null }, - "int &operator>>(int &reader, double &rhs)": { + "int ConfigurationParser::GetInt(const std::string &key, int defaultValue) const": { "history": { - "A": 6 + "A": 12 }, "size": null }, - "int &operator>>(int &reader, float &rhs)": { + "int main(int argc, char *argv[])": { "history": { - "A": 6 + "A": 7 }, "size": null }, - "int &operator>>(int &reader, int &rhs)": { + "std::shared_ptr safe_pointer_cast(const std::shared_ptr &obj)": { "history": { - "A": 6 + "A": 1 }, "size": null }, - "int &operator>>(int &reader, long &rhs)": { + "std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "history": { "A": 6 }, "size": null }, - "int StreamStatusToString(const TStream &stream)": { + "std::string StreamStatusToString(const TStream &stream)": { "history": { "A": 1 }, "size": null }, - "int main(int argc, char *argv[])": { + "void ConfigurationParser::Load(std::istream &inputStream)": { "history": { - "A": 7 - }, - "size": null - }, - "int safe_pointer_cast(const int &obj)": { - "history": { - "A": 1 + "A": 23 }, "size": null }, - "void ReportException(const int &ex, int level)": { + "void ReportException(const std::exception &ex, int level)": { "history": { "A": 21 }, diff --git a/test/test_analytics/baseline/cpp_test_repo/B.g.json b/test/test_analytics/baseline/cpp_test_repo/B.g.json index 2d4d789f1b3..f504ab4e582 100644 --- a/test/test_analytics/baseline/cpp_test_repo/B.g.json +++ b/test/test_analytics/baseline/cpp_test_repo/B.g.json @@ -1,50 +1,102 @@ { "edges": { - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)|->|bool Equal(const int &lhs, const int &rhs, int comparision)": { + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)|->|TStream OpenAndValidate(const TPath arg1)": { "addedBy": "A", "weight": null }, - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)|->|enum class StringComparison : int {}": { + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)|->|void ConfigurationParser::Load(std::istream &inputStream)": { "addedBy": "A", "weight": null }, - "bool Equal(const int &lhs, const int &rhs, int comparision)|->|enum class StringComparison : int {}": { - "addedBy": "B", + "ConfigurationParser::ConfigurationParser(std::istream &inputStream)|->|void ConfigurationParser::Load(std::istream &inputStream)": { + "addedBy": "A", "weight": null }, - "const char *FriendlyNameOf(const ReliabilityNetworkEntry &instance)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { "addedBy": "A", "weight": null }, - "const char *FriendlyNameOf(const std::type_index &type)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { "addedBy": "A", "weight": null }, - "const char *FriendlyNameOf(const type_info &type)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|enum class StringComparison : int {}": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, double &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, double &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, float &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, float &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, int &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, long &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "A", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, long &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "addedBy": "A", + "weight": null + }, + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { + "addedBy": "A", + "weight": null + }, + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|enum class StringComparison : int {}": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|bool Equal(const int &lhs, const int &rhs, int comparision)": { + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|enum class StringComparison : int {}": { + "bool Confirm(const std::string &prompt)|->|bool Confirm(const std::string &prompt)": { + "addedBy": "B", + "weight": null + }, + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { + "addedBy": "B", + "weight": null + }, + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)|->|enum class StringComparison : int {}": { + "addedBy": "B", + "weight": null + }, + "const char *FriendlyNameOf(const ReliabilityNetworkEntry &instance)|->|const char *FriendlyNameOf()": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "const char *FriendlyNameOf(const std::type_index &type)|->|const char *FriendlyNameOf()": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, double &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "const char *FriendlyNameOf(const type_info &type)|->|const char *FriendlyNameOf()": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, float &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "double ConfigurationParser::GetDouble(const std::string &key, double defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "addedBy": "A", "weight": null }, - "int &operator>>(int &reader, long &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "int ConfigurationParser::GetInt(const std::string &key, int defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "addedBy": "A", "weight": null }, @@ -52,11 +104,27 @@ "addedBy": "B", "weight": null }, - "int main(int argc, char *argv[])|->|void ReportException(const int &ex, int level)": { + "int main(int argc, char *argv[])|->|bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const": { + "addedBy": "B", + "weight": null + }, + "int main(int argc, char *argv[])|->|double ConfigurationParser::GetDouble(const std::string &key, double defaultValue) const": { + "addedBy": "B", + "weight": null + }, + "int main(int argc, char *argv[])|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "addedBy": "B", "weight": null }, - "void ReportException(const int &ex, int level)|->|void ReportException(const int &ex, int level)": { + "int main(int argc, char *argv[])|->|void ReportException(const std::exception &ex, int level)": { + "addedBy": "B", + "weight": null + }, + "void ConfigurationParser::Load(std::istream &inputStream)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "A", + "weight": null + }, + "void ReportException(const std::exception &ex, int level)|->|void ReportException(const std::exception &ex, int level)": { "addedBy": "B", "weight": null } @@ -110,33 +178,51 @@ }, "size": null }, + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)": { + "history": { + "A": 5 + }, + "size": null + }, + "ConfigurationParser::ConfigurationParser(std::istream &inputStream)": { + "history": { + "A": 4 + }, + "size": null + }, "RowReader &operator>>(RowReader &reader, bool &rhs)": { "history": { - "A": 1 + "A": 25 }, "size": null }, "RowReader &operator>>(RowReader &reader, double &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, float &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, int &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, long &rhs)": { "history": { - "A": 1 + "A": 7 + }, + "size": null + }, + "RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "history": { + "A": 17 }, "size": null }, @@ -146,6 +232,18 @@ }, "size": null }, + "TEnum operator&(TEnum lhs, TEnum rhs)": { + "history": { + "A": 1 + }, + "size": null + }, + "TEnum operator|(TEnum lhs, TEnum rhs)": { + "history": { + "A": 1 + }, + "size": null + }, "TStream &operator>>(TStream &s, RowReader &reader)": { "history": { "A": 1 @@ -176,7 +274,7 @@ }, "size": null }, - "_RangeToEnumerable RangeToEnumerable(const int range)": { + "_RangeToEnumerable RangeToEnumerable(const std::pair range)": { "history": { "A": 1 }, @@ -188,21 +286,21 @@ }, "size": null }, - "bool Confirm(const int &prompt)": { + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const": { "history": { - "A": 17 + "A": 16 }, "size": null }, - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)": { + "bool Confirm(const std::string &prompt)": { "history": { - "A": 1 + "A": 18 }, "size": null }, - "bool Equal(const int &lhs, const int &rhs, int comparision)": { + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { "history": { - "A": 29 + "A": 30 }, "size": null }, @@ -212,7 +310,7 @@ }, "size": null }, - "bool pointer_kind_of(const int obj)": { + "bool pointer_kind_of(const std::shared_ptr obj)": { "history": { "A": 1 }, @@ -242,68 +340,62 @@ }, "size": null }, - "enum class StringComparison : int {}": { + "double ConfigurationParser::GetDouble(const std::string &key, double defaultValue) const": { "history": { - "A": 6 + "A": 12 }, "size": null }, - "inline int to_string(const int &value)": { + "enum class StringComparison : int {}": { "history": { - "A": 4 + "A": 6 }, "size": null }, - "int &operator>>(int &reader, bool &rhs)": { + "inline std::string to_string(const std::pair &value)": { "history": { - "A": 24 + "A": 4 }, "size": null }, - "int &operator>>(int &reader, double &rhs)": { + "int ConfigurationParser::GetInt(const std::string &key, int defaultValue) const": { "history": { - "A": 6 + "A": 12 }, "size": null }, - "int &operator>>(int &reader, float &rhs)": { + "int main(int argc, char *argv[])": { "history": { - "A": 6 + "A": 7, + "B": 4 }, "size": null }, - "int &operator>>(int &reader, int &rhs)": { + "std::shared_ptr safe_pointer_cast(const std::shared_ptr &obj)": { "history": { - "A": 6 + "A": 1 }, "size": null }, - "int &operator>>(int &reader, long &rhs)": { + "std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "history": { "A": 6 }, "size": null }, - "int StreamStatusToString(const TStream &stream)": { + "std::string StreamStatusToString(const TStream &stream)": { "history": { "A": 1 }, "size": null }, - "int main(int argc, char *argv[])": { + "void ConfigurationParser::Load(std::istream &inputStream)": { "history": { - "A": 7, - "B": 4 - }, - "size": null - }, - "int safe_pointer_cast(const int &obj)": { - "history": { - "A": 1 + "A": 23 }, "size": null }, - "void ReportException(const int &ex, int level)": { + "void ReportException(const std::exception &ex, int level)": { "history": { "A": 21 }, diff --git a/test/test_analytics/baseline/cpp_test_repo/C.g.json b/test/test_analytics/baseline/cpp_test_repo/C.g.json index 4d25d6e1f11..88834d24b6f 100644 --- a/test/test_analytics/baseline/cpp_test_repo/C.g.json +++ b/test/test_analytics/baseline/cpp_test_repo/C.g.json @@ -1,50 +1,102 @@ { "edges": { - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)|->|bool Equal(const int &lhs, const int &rhs, int comparision)": { + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)|->|TStream OpenAndValidate(const TPath arg1)": { "addedBy": "C", "weight": null }, - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)|->|enum class StringComparison : int {}": { + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)|->|void ConfigurationParser::Load(std::istream &inputStream)": { "addedBy": "C", "weight": null }, - "bool Equal(const int &lhs, const int &rhs, int comparision)|->|enum class StringComparison : int {}": { + "ConfigurationParser::ConfigurationParser(std::istream &inputStream)|->|void ConfigurationParser::Load(std::istream &inputStream)": { "addedBy": "C", "weight": null }, - "const char *FriendlyNameOf(const ReliabilityNetworkEntry &instance)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { "addedBy": "C", "weight": null }, - "const char *FriendlyNameOf(const std::type_index &type)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { "addedBy": "C", "weight": null }, - "const char *FriendlyNameOf(const type_info &type)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { + "addedBy": "C", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|enum class StringComparison : int {}": { + "addedBy": "C", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, double &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "C", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, double &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "addedBy": "C", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, float &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "C", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, float &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "addedBy": "C", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, int &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "addedBy": "C", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, long &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "C", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, long &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "addedBy": "C", + "weight": null + }, + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { + "addedBy": "C", + "weight": null + }, + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|enum class StringComparison : int {}": { "addedBy": "C", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|bool Equal(const int &lhs, const int &rhs, int comparision)": { + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "addedBy": "C", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|enum class StringComparison : int {}": { + "bool Confirm(const std::string &prompt)|->|bool Confirm(const std::string &prompt)": { "addedBy": "C", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { "addedBy": "C", "weight": null }, - "int &operator>>(int &reader, double &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)|->|enum class StringComparison : int {}": { "addedBy": "C", "weight": null }, - "int &operator>>(int &reader, float &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "const char *FriendlyNameOf(const ReliabilityNetworkEntry &instance)|->|const char *FriendlyNameOf()": { "addedBy": "C", "weight": null }, - "int &operator>>(int &reader, long &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "const char *FriendlyNameOf(const std::type_index &type)|->|const char *FriendlyNameOf()": { + "addedBy": "C", + "weight": null + }, + "const char *FriendlyNameOf(const type_info &type)|->|const char *FriendlyNameOf()": { + "addedBy": "C", + "weight": null + }, + "double ConfigurationParser::GetDouble(const std::string &key, double defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { + "addedBy": "C", + "weight": null + }, + "int ConfigurationParser::GetInt(const std::string &key, int defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "addedBy": "C", "weight": null }, @@ -52,11 +104,27 @@ "addedBy": "C", "weight": null }, - "int main(int argc, char *argv[])|->|void ReportException(const int &ex, int level)": { + "int main(int argc, char *argv[])|->|bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const": { + "addedBy": "C", + "weight": null + }, + "int main(int argc, char *argv[])|->|double ConfigurationParser::GetDouble(const std::string &key, double defaultValue) const": { + "addedBy": "B", + "weight": null + }, + "int main(int argc, char *argv[])|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "addedBy": "B", "weight": null }, - "void ReportException(const int &ex, int level)|->|void ReportException(const int &ex, int level)": { + "int main(int argc, char *argv[])|->|void ReportException(const std::exception &ex, int level)": { + "addedBy": "B", + "weight": null + }, + "void ConfigurationParser::Load(std::istream &inputStream)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "C", + "weight": null + }, + "void ReportException(const std::exception &ex, int level)|->|void ReportException(const std::exception &ex, int level)": { "addedBy": "C", "weight": null } @@ -110,33 +178,52 @@ }, "size": null }, + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)": { + "history": { + "A": 5 + }, + "size": null + }, + "ConfigurationParser::ConfigurationParser(std::istream &inputStream)": { + "history": { + "A": 4 + }, + "size": null + }, "RowReader &operator>>(RowReader &reader, bool &rhs)": { "history": { - "A": 1 + "A": 25, + "C": 4 }, "size": null }, "RowReader &operator>>(RowReader &reader, double &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, float &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, int &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, long &rhs)": { "history": { - "A": 1 + "A": 7 + }, + "size": null + }, + "RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "history": { + "A": 17 }, "size": null }, @@ -146,6 +233,18 @@ }, "size": null }, + "TEnum operator&(TEnum lhs, TEnum rhs)": { + "history": { + "A": 1 + }, + "size": null + }, + "TEnum operator|(TEnum lhs, TEnum rhs)": { + "history": { + "A": 1 + }, + "size": null + }, "TStream &operator>>(TStream &s, RowReader &reader)": { "history": { "A": 1 @@ -176,7 +275,7 @@ }, "size": null }, - "_RangeToEnumerable RangeToEnumerable(const int range)": { + "_RangeToEnumerable RangeToEnumerable(const std::pair range)": { "history": { "A": 1 }, @@ -188,21 +287,22 @@ }, "size": null }, - "bool Confirm(const int &prompt)": { + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const": { "history": { - "A": 17 + "A": 16, + "C": 4 }, "size": null }, - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)": { + "bool Confirm(const std::string &prompt)": { "history": { - "A": 1 + "A": 18 }, "size": null }, - "bool Equal(const int &lhs, const int &rhs, int comparision)": { + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { "history": { - "A": 29, + "A": 30, "C": 2 }, "size": null @@ -213,7 +313,7 @@ }, "size": null }, - "bool pointer_kind_of(const int obj)": { + "bool pointer_kind_of(const std::shared_ptr obj)": { "history": { "A": 1 }, @@ -243,71 +343,64 @@ }, "size": null }, - "enum class StringComparison : int {}": { + "double ConfigurationParser::GetDouble(const std::string &key, double defaultValue) const": { "history": { - "A": 6, - "C": 2 + "A": 12 }, "size": null }, - "inline int to_string(const int &value)": { + "enum class StringComparison : int {}": { "history": { - "A": 4 + "A": 6, + "C": 2 }, "size": null }, - "int &operator>>(int &reader, bool &rhs)": { + "inline std::string to_string(const std::pair &value)": { "history": { - "A": 24, - "C": 4 + "A": 4 }, "size": null }, - "int &operator>>(int &reader, double &rhs)": { + "int ConfigurationParser::GetInt(const std::string &key, int defaultValue) const": { "history": { - "A": 6 + "A": 12 }, "size": null }, - "int &operator>>(int &reader, float &rhs)": { + "int main(int argc, char *argv[])": { "history": { - "A": 6 + "A": 7, + "B": 4, + "C": 4 }, "size": null }, - "int &operator>>(int &reader, int &rhs)": { + "std::shared_ptr safe_pointer_cast(const std::shared_ptr &obj)": { "history": { - "A": 6 + "A": 1 }, "size": null }, - "int &operator>>(int &reader, long &rhs)": { + "std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "history": { "A": 6 }, "size": null }, - "int StreamStatusToString(const TStream &stream)": { + "std::string StreamStatusToString(const TStream &stream)": { "history": { "A": 1 }, "size": null }, - "int main(int argc, char *argv[])": { - "history": { - "A": 7, - "B": 4, - "C": 4 - }, - "size": null - }, - "int safe_pointer_cast(const int &obj)": { + "void ConfigurationParser::Load(std::istream &inputStream)": { "history": { - "A": 1 + "A": 23 }, "size": null }, - "void ReportException(const int &ex, int level)": { + "void ReportException(const std::exception &ex, int level)": { "history": { "A": 21 }, diff --git a/test/test_analytics/baseline/cpp_test_repo/D.g.json b/test/test_analytics/baseline/cpp_test_repo/D.g.json index 74f9d08d417..3e271ea882d 100644 --- a/test/test_analytics/baseline/cpp_test_repo/D.g.json +++ b/test/test_analytics/baseline/cpp_test_repo/D.g.json @@ -1,50 +1,102 @@ { "edges": { - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)|->|bool Equal(const int &lhs, const int &rhs, int comparision)": { + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)|->|TStream OpenAndValidate(const TPath arg1)": { "addedBy": "D", "weight": null }, - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)|->|enum class StringComparison : int {}": { + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)|->|void ConfigurationParser::Load(std::istream &inputStream)": { "addedBy": "D", "weight": null }, - "bool Equal(const int &lhs, const int &rhs, int comparision)|->|enum class StringComparison : int {}": { + "ConfigurationParser::ConfigurationParser(std::istream &inputStream)|->|void ConfigurationParser::Load(std::istream &inputStream)": { "addedBy": "D", "weight": null }, - "const char *FriendlyNameOf(const ReliabilityNetworkEntry &instance)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { "addedBy": "D", "weight": null }, - "const char *FriendlyNameOf(const std::type_index &type)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { "addedBy": "D", "weight": null }, - "const char *FriendlyNameOf(const type_info &type)|->|const char *FriendlyNameOf()": { + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { + "addedBy": "D", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, bool &rhs)|->|enum class StringComparison : int {}": { + "addedBy": "D", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, double &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "D", + "weight": null + }, + "RowReader &operator>>(RowReader &reader, double &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { "addedBy": "D", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|bool Equal(const int &lhs, const int &rhs, int comparision)": { + "RowReader &operator>>(RowReader &reader, float &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { "addedBy": "D", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|enum class StringComparison : int {}": { + "RowReader &operator>>(RowReader &reader, float &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { "addedBy": "D", "weight": null }, - "int &operator>>(int &reader, bool &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "RowReader &operator>>(RowReader &reader, int &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { "addedBy": "D", "weight": null }, - "int &operator>>(int &reader, double &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "RowReader &operator>>(RowReader &reader, long &rhs)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { "addedBy": "D", "weight": null }, - "int &operator>>(int &reader, float &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "RowReader &operator>>(RowReader &reader, long &rhs)|->|RowReader &operator>>(RowReader &reader, std::string &rhs)": { "addedBy": "D", "weight": null }, - "int &operator>>(int &reader, long &rhs)|->|int &operator>>(int &reader, int &rhs)": { + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { + "addedBy": "D", + "weight": null + }, + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|enum class StringComparison : int {}": { + "addedBy": "D", + "weight": null + }, + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { + "addedBy": "D", + "weight": null + }, + "bool Confirm(const std::string &prompt)|->|bool Confirm(const std::string &prompt)": { + "addedBy": "D", + "weight": null + }, + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)|->|bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { + "addedBy": "D", + "weight": null + }, + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)|->|enum class StringComparison : int {}": { + "addedBy": "D", + "weight": null + }, + "const char *FriendlyNameOf(const ReliabilityNetworkEntry &instance)|->|const char *FriendlyNameOf()": { + "addedBy": "D", + "weight": null + }, + "const char *FriendlyNameOf(const std::type_index &type)|->|const char *FriendlyNameOf()": { + "addedBy": "D", + "weight": null + }, + "const char *FriendlyNameOf(const type_info &type)|->|const char *FriendlyNameOf()": { + "addedBy": "D", + "weight": null + }, + "double ConfigurationParser::GetDouble(const std::string &key, double defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { + "addedBy": "D", + "weight": null + }, + "int ConfigurationParser::GetInt(const std::string &key, int defaultValue) const|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "addedBy": "D", "weight": null }, @@ -52,11 +104,27 @@ "addedBy": "C", "weight": null }, - "int main(int argc, char *argv[])|->|void ReportException(const int &ex, int level)": { + "int main(int argc, char *argv[])|->|bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const": { + "addedBy": "C", + "weight": null + }, + "int main(int argc, char *argv[])|->|double ConfigurationParser::GetDouble(const std::string &key, double defaultValue) const": { + "addedBy": "B", + "weight": null + }, + "int main(int argc, char *argv[])|->|std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { + "addedBy": "B", + "weight": null + }, + "int main(int argc, char *argv[])|->|void ReportException(const std::exception &ex, int level)": { "addedBy": "B", "weight": null }, - "void ReportException(const int &ex, int level)|->|void ReportException(const int &ex, int level)": { + "void ConfigurationParser::Load(std::istream &inputStream)|->|RowReader &operator>>(RowReader &reader, int &rhs)": { + "addedBy": "D", + "weight": null + }, + "void ReportException(const std::exception &ex, int level)|->|void ReportException(const std::exception &ex, int level)": { "addedBy": "D", "weight": null } @@ -110,33 +178,53 @@ }, "size": null }, + "ConfigurationParser::ConfigurationParser(std::filesystem::path filePath)": { + "history": { + "A": 5 + }, + "size": null + }, + "ConfigurationParser::ConfigurationParser(std::istream &inputStream)": { + "history": { + "A": 4 + }, + "size": null + }, "RowReader &operator>>(RowReader &reader, bool &rhs)": { "history": { - "A": 1 + "A": 25, + "C": 4, + "D": 4 }, "size": null }, "RowReader &operator>>(RowReader &reader, double &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, float &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, int &rhs)": { "history": { - "A": 1 + "A": 7 }, "size": null }, "RowReader &operator>>(RowReader &reader, long &rhs)": { "history": { - "A": 1 + "A": 7 + }, + "size": null + }, + "RowReader &operator>>(RowReader &reader, std::string &rhs)": { + "history": { + "A": 17 }, "size": null }, @@ -146,6 +234,18 @@ }, "size": null }, + "TEnum operator&(TEnum lhs, TEnum rhs)": { + "history": { + "A": 1 + }, + "size": null + }, + "TEnum operator|(TEnum lhs, TEnum rhs)": { + "history": { + "A": 1 + }, + "size": null + }, "TStream &operator>>(TStream &s, RowReader &reader)": { "history": { "A": 1 @@ -176,7 +276,7 @@ }, "size": null }, - "_RangeToEnumerable RangeToEnumerable(const int range)": { + "_RangeToEnumerable RangeToEnumerable(const std::pair range)": { "history": { "A": 1 }, @@ -188,21 +288,23 @@ }, "size": null }, - "bool Confirm(const int &prompt)": { + "bool ConfigurationParser::GetBool(const std::string &key, bool defaultValue) const": { "history": { - "A": 17 + "A": 16, + "C": 4, + "D": 4 }, "size": null }, - "bool Equal(const int &lhs, const int &rhs, StringComparison comparision)": { + "bool Confirm(const std::string &prompt)": { "history": { - "A": 1 + "A": 18 }, "size": null }, - "bool Equal(const int &lhs, const int &rhs, int comparision)": { + "bool Equal(const std::string &lhs, const std::string &rhs, StringComparison comparision)": { "history": { - "A": 29, + "A": 30, "C": 2, "D": 2 }, @@ -214,7 +316,7 @@ }, "size": null }, - "bool pointer_kind_of(const int obj)": { + "bool pointer_kind_of(const std::shared_ptr obj)": { "history": { "A": 1 }, @@ -244,6 +346,12 @@ }, "size": null }, + "double ConfigurationParser::GetDouble(const std::string &key, double defaultValue) const": { + "history": { + "A": 12 + }, + "size": null + }, "enum class StringComparison : int {}": { "history": { "A": 6, @@ -252,66 +360,52 @@ }, "size": null }, - "inline int to_string(const int &value)": { + "inline std::string to_string(const std::pair &value)": { "history": { "A": 4 }, "size": null }, - "int &operator>>(int &reader, bool &rhs)": { + "int ConfigurationParser::GetInt(const std::string &key, int defaultValue) const": { "history": { - "A": 24, - "C": 4, - "D": 4 + "A": 12 }, "size": null }, - "int &operator>>(int &reader, double &rhs)": { - "history": { - "A": 6 - }, - "size": null - }, - "int &operator>>(int &reader, float &rhs)": { + "int main(int argc, char *argv[])": { "history": { - "A": 6 + "A": 7, + "B": 4, + "C": 4, + "D": 7 }, "size": null }, - "int &operator>>(int &reader, int &rhs)": { + "std::shared_ptr safe_pointer_cast(const std::shared_ptr &obj)": { "history": { - "A": 6 + "A": 1 }, "size": null }, - "int &operator>>(int &reader, long &rhs)": { + "std::string ConfigurationParser::GetString(const std::string &key, const std::string &defaultValue) const": { "history": { "A": 6 }, "size": null }, - "int StreamStatusToString(const TStream &stream)": { + "std::string StreamStatusToString(const TStream &stream)": { "history": { "A": 1 }, "size": null }, - "int main(int argc, char *argv[])": { + "void ConfigurationParser::Load(std::istream &inputStream)": { "history": { - "A": 7, - "B": 4, - "C": 4, - "D": 7 - }, - "size": null - }, - "int safe_pointer_cast(const int &obj)": { - "history": { - "A": 1 + "A": 23 }, "size": null }, - "void ReportException(const int &ex, int level)": { + "void ReportException(const std::exception &ex, int level)": { "history": { "A": 21 },