As developers of libraries implementing interval arithmetic, we faced the same difficulties when it comes 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? Before considering these questions, we briefly recall the main features of interval arithmetic and of the IEEE 1788-2015 standard for interval arithmetic. After listing the different aspects that, in our opinion, must be tested, we contribute a first step towards offering a test suite for an interval arithmetic library. First we define a format that enables the exchange of test cases, so that they can be read and tried easily. Then we offer a first set of test cases, for a selected set of mathematical functions. Next, we examine how the Julia interval arithmetic library, IntervalArithmetic.jl, actually performs to these tests. As this is an ongoing work, we list extra tests that we deem important to perform.
翻译:作为实现区间算术库的开发者,我们在测试自身库时面临相同困境:必须测试哪些内容?如何设计有效的单元测试用例?如何确保高(甚至100%)测试覆盖率?在探讨这些问题前,我们首先简要回顾区间算术的核心特性及IEEE 1788-2015区间算术标准。通过梳理我们认为必须测试的各个维度,我们为区间算术库测试套件的构建迈出了第一步。首先定义一种支持测试用例交换的格式,使测试用例易于读取和运行;随后针对选定数学函数提供首批测试用例集;接着评估Julia区间算术库IntervalArithmetic.jl在实际测试中的表现。鉴于本工作仍在持续进行中,我们列出了认为亟待补充的扩展测试项。