As developers of libraries implementing interval arithmetic, we faced the same difficulties when it came to testing our libraries. What must be tested? How can we devise relevant test cases for unit testing? How can we ensure a high (and possibly 100%) test coverage? In this paper we list the different aspects that, in our opinion, must be tested, giving indications on the choice of test cases. Then we examine how several interval arithmetic libraries actually perform tests. Next, we introduce two frameworks developed specifically to gather test cases and to incorporate easily new libraries in order to test them, namely JInterval and ITF1788. Not every important aspects of our libraries fit in these frameworks and we list extra tests that we deem important, but not easy, to perform.
翻译:作为图书馆的开发者,我们执行间距算术,在测试图书馆时也面临同样的困难。必须测试什么?我们如何设计相关的测试案例进行单位测试?我们如何确保高(可能100%)测试覆盖率?在本文件中我们列举了我们认为必须测试的不同方面,并说明了测试案例的选择。然后我们审视了几个间距图书馆是如何实际进行测试的。接下来,我们引入了两个专门开发的框架,以收集测试案例,并方便地纳入新的图书馆,以测试它们,即J Interval和ITF1788。并不是我们图书馆的每一个重要方面都适合这些框架,我们列举了我们认为重要但并非容易进行的额外测试。