tayloh / algorithms

Minimal examples of data structures and algorithms in Python (forked for DD2480 assignment 3)
MIT License
0 stars 0 forks source link

Add manual instrumentation and test cases for tree/red_black_tree/red_black_tree.py. #4

Open aoengin opened 1 year ago

aoengin commented 1 year ago

Task1: Add manual instrumentation to measure the coverage rate for the tree/red_black_tree/red_black_tree.py.

Task2: Add test cases to increase the coverage rate for tree/red_black_tree/red_black_tree.py.

aoengin commented 1 year ago

Branch coverage is increased from 0% to the 77%. (Measured by coverage.py) (Other methods excluded)

Results of my own tool: Before test implementations:

[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

After test implementations:

[1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1]