HomePhabricator

[SyntaxTree] Test `findFirstLeaf` and `findLastLeaf`

Authored by eduucaldas on Sep 16 2020, 1:03 AM.

Description

[SyntaxTree] Test findFirstLeaf and findLastLeaf

  • Introduce TreeTest.cpp to unit test Tree.h
  • Add generateAllTreesWithShape to generating test cases
  • Add tests for findFirstLeaf and findLastLeaf
  • Fix implementations of findFirstLeaf and findLastLeaf that had

been broken when empty Tree were present.

Differential Revision: https://reviews.llvm.org/D87779