Add unit test for edge computation.
Add unit test for loops.