Commit Graph

5 Commits

Author SHA1 Message Date
Xi Ge
97233420b8 test: disable FixedPointConversion tests while investigating related CI failures. rdar://49177883 2019-03-24 11:51:14 -07:00
David Zarzycki
e5f8e30c15 [Testing] Mark FixedPointConversion tests as "long_test" (#23522)
As of 14d89ec1c1, these tests now take
2.25x longer than the *entire* validation test suite on fast machines.
Mark them as "long_test" for now until they can be broken into smaller
concurrent tests.
2019-03-24 13:21:39 -04:00
Daniel Rodríguez Troitiño
4dcf60ca0f [test] Fix FixedPointConversion tests (#23220)
Fix several problems with FixedPointConversion generation code.

The first problem is that at some point `repr(value)` was being used,
which turn the number into a string. That was great for printing the
number, but make the test against the value of the number (like
`testValue < otherMin` always false. There were a number of tests that
were never performed, specifically the integer tests.

The second problem was using doubles in the Python code. For Float32 and
Float64 the tests were generated correctly, but in the case of Float80,
the test adding or removing a quantity to the maximum/minimum were
failing because of the lack of precission (Adding 0.1 to a very
big/small number is the same as not adding anything). Switching to
Decimal should keep enough precission for the tests.

Finally the last problem was that the bounds of the conversions are not
actually `selfMin` and `selfMax`, but the values returned by the utility
function `getFtoIBounds`. For example for unsigned types, the lower
bound is always -1, not zero (every value between -1 and zero is rounded
to zero, and doesn't fail).

Instead of using nested gyb templates, use lit.cfg %target-ptrsize,
which should be faster, cleaner, and provides correct line-directive
output.

Remove a bunch of warnings in Swift when compiling the generated result
of FixedPointConversion.swift.gyb.

Co-authored-by: Gwynne Raskind <gwynne@users.noreply.github.com>
2019-03-21 13:58:30 -04:00
Arnold Schwaighofer
b62c6e64ff Codesign validation-test/stdlib 2018-08-10 09:39:09 -07:00
David Zarzycki
f5ae7b2584 [validation tests] Improve concurrency
This improves 'ninja check-swift-validation' by about 35% on my Linux desktop.
2018-03-21 09:28:51 -04:00