{"id":24142841,"url":"https://github.com/gmbeddard/ee200-binary_tree_tests","last_synced_at":"2025-07-18T16:09:04.183Z","repository":{"id":272086236,"uuid":"915487292","full_name":"gmbeddard/ee200-binary_tree_tests","owner":"gmbeddard","description":"A comprehensive test suite for evaluating 10 BST implementations. Includes validation of insertion, deletion, search, traversal, and memory management, with detailed analysis of failures and bugs.","archived":false,"fork":false,"pushed_at":"2025-01-12T01:00:53.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T13:42:37.642Z","etag":null,"topics":["binary-search-tree","cpp20","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmbeddard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-12T00:57:55.000Z","updated_at":"2025-01-12T01:01:35.000Z","dependencies_parsed_at":"2025-01-12T02:18:36.988Z","dependency_job_id":"cd639616-aff2-433e-b4a9-3b76ec481acf","html_url":"https://github.com/gmbeddard/ee200-binary_tree_tests","commit_stats":null,"previous_names":["gmbeddard/ee200-binary_tree_tests"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gmbeddard/ee200-binary_tree_tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmbeddard%2Fee200-binary_tree_tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmbeddard%2Fee200-binary_tree_tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmbeddard%2Fee200-binary_tree_tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmbeddard%2Fee200-binary_tree_tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmbeddard","download_url":"https://codeload.github.com/gmbeddard/ee200-binary_tree_tests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmbeddard%2Fee200-binary_tree_tests/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265791831,"owners_count":23829166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-search-tree","cpp20","unit-testing"],"created_at":"2025-01-12T05:13:34.987Z","updated_at":"2025-07-18T16:09:04.166Z","avatar_url":"https://github.com/gmbeddard.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"### EE200 Homework Assignment: Testing Binary Search Tree Implementations\n\n#### Project Overview\nThis project flips the script on typical programming assignments: instead of writing the implementation, you write tests. The goal is to evaluate 10 provided implementations of a binary search tree (BST) for integers and determine which, if any, work as described in the `btree.h` header file. Each implementation is tested for correctness and robustness across various scenarios, with the ultimate objective of identifying bugs and failures. I was successful in getting 8 out of 10 test cases to fail.\n\n#### Features\n- **Test Cases**:\n  - Validate core BST operations, including insertion, deletion, search, and traversal.\n  - Verify proper behavior of member functions such as `remove()`, `contains()`, and `toArray()`.\n  - Test edge cases like empty trees, single-node trees, and large trees.\n  - Assess memory management, including potential memory leaks and invalid pointer access.\n- **Automated Testing**:\n  - Tests are compiled and run using a provided Makefile.\n  - Comprehensive assertions ensure robust verification of BST behavior.\n\n#### Key Observations\n- **Memory Issues**: Multiple implementations struggle with memory management, particularly in freeing arrays created by `toArray()` or handling empty trees.\n- **Segmentation Faults**: Several implementations crash when handling edge cases like removing non-existent values or deep copying empty trees.\n- **Logical Errors**:\n  - Mismanagement of the root node during removal and restructuring.\n  - Incorrect handling of array size or null pointers in `toArray()`.\n  - Faulty implementations of `contains()` leading to incorrect search results.\n- **Edge Cases**: Large trees, empty trees, and special values like `INT_MIN` expose weaknesses in several implementations.\n\n#### Repository Content\n- **Test Code**: Includes comprehensive unit tests for all BST functionalities and edge cases.\n- **Makefile**: Automates the compilation and execution of test cases.\n\n#### Authors\nGabby Beddard. Project completed as part of an assignment on debugging and testing in a data structures course. Tests focus on identifying bugs and ensuring robust tree behavior.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmbeddard%2Fee200-binary_tree_tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmbeddard%2Fee200-binary_tree_tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmbeddard%2Fee200-binary_tree_tests/lists"}