Skip to content

Commit

Permalink
Fix unit test baseline of cpp_test_repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
hurthwell committed Feb 19, 2019
1 parent 31ba13f commit e0ddf2b
Show file tree
Hide file tree
Showing 5 changed files with 580 additions and 212 deletions.
7 changes: 6 additions & 1 deletion persper/analytics/lsp_graph_server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
* 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`.
182 changes: 133 additions & 49 deletions test/test_analytics/baseline/cpp_test_repo/A.g.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,118 @@
{
"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
},
"int main(int argc, char *argv[])|->|TStream OpenAndValidate(const TPath arg1)": {
"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
}
Expand Down Expand Up @@ -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
},
Expand All @@ -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
Expand Down Expand Up @@ -172,7 +262,7 @@
},
"size": null
},
"_RangeToEnumerable<TIterator> RangeToEnumerable(const int range)": {
"_RangeToEnumerable<TIterator> RangeToEnumerable(const std::pair<TIterator, TIterator> range)": {
"history": {
"A": 1
},
Expand All @@ -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
},
Expand All @@ -208,7 +298,7 @@
},
"size": null
},
"bool pointer_kind_of(const int obj)": {
"bool pointer_kind_of(const std::shared_ptr<TSrc> obj)": {
"history": {
"A": 1
},
Expand Down Expand Up @@ -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<std::string, std::string> &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<TDest> safe_pointer_cast(const std::shared_ptr<TSrc> &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
},
Expand Down
Loading

0 comments on commit e0ddf2b

Please sign in to comment.