Skip to content

gwater/ITF1788.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ITF1788

Build Status Coverage

This package is a parser of the Interval Tests Libraries (ITL) testsuite, created by Oliver Heimlich and available here. The tests are to verify whether an interval arithmetic implementation is complying to the IEEE 1788-2015 standard for interval arithmetic. This package converts the test suite to tests in Julia, which can be used to test IntervalArithmetic.jl

This Fork

This fork has several goals:

This fork includes many contributions from Josua Grawitter.

How to use

Install and import the fork with

julia> using Pkg; Pkg.add("https://github.com/gwater/ITF1788.jl.git") # only once to install
julia> using ITF1788

then run

julia> generate()

and this function will convert all the test into Julia tests, actually check the tests and mark as broken those not passing.

For example, if the original .itl file had a line like

add [1.0, 2.0] [1.0, 2.0] = [2.0, 4.0]

this will become

@test +(interval(1.0, 2.0), interval(1.0, 2.0)) == interval(2.0, 4.0)

if the test is successful and

@test_broken +(interval(1.0, 2.0), interval(1.0, 2.0)) == interval(2.0, 4.0)

if the test is unsuccessful.

If the test causes an exception, the translation is probably invalid and we return the original test case as a comment:

# add [1.0, 2.0] [1.0, 2.0] = [2.0, 4.0]

By default, all test files are created into a folder test_ITF1788 in your current directory. You can change the output directory with the keyword output, e.g. generate(; output="mydirectory").

The function will also create a run_ITF1788.jl which includes all the tests files, i.e. all you have to do to test IntervalArithmetic.jl against this test suite is

include("test_ITF1788/run_ITF1788.jl")

Original Author

About

Parser to translate ITL to Julia

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 100.0%