根据软件设计模式分层设计的思想,测试用例作为最上层的业务层面,其很多的操作行为应该定义得足够抽象,通过中间层来接触测试用例和实际被测对象之间的耦合关系。这一方法非常常见,比如操作系统,其驱动程序就是一个中间层,解耦了用户对硬件的操作,又比如嵌入式系统中的 HAL 层,也就是硬件抽象层。这样的设计,可以将底层具体的操作封装起来,不暴露给上层用户,上层用户调用的函数或方法就是一个很抽象的操作。
在
1361 Validate Binary Tree Nodes 验证二叉树
Description:
You have n binary tree nodes numbered from 0 to n - 1 where node i has two children leftChild[i] and rightChild[i], return true if and only if all th