2019-07-29 09:38:25 +01:00
|
|
|
import pytest
|
|
|
|
|
2019-04-10 22:03:02 +01:00
|
|
|
import helpers
|
2019-02-27 14:50:25 +00:00
|
|
|
import pqclean
|
|
|
|
|
|
|
|
|
2019-07-29 09:38:25 +01:00
|
|
|
@pytest.mark.parametrize(
|
|
|
|
'implementation',
|
|
|
|
pqclean.Scheme.all_implementations(),
|
|
|
|
ids=str,
|
|
|
|
)
|
2019-04-18 09:00:08 +01:00
|
|
|
@helpers.filtered_test
|
2019-07-29 09:38:25 +01:00
|
|
|
def test_format(implementation: pqclean.Implementation):
|
2019-04-10 22:03:02 +01:00
|
|
|
helpers.ensure_available('astyle')
|
2019-03-05 13:35:19 +00:00
|
|
|
cfiles = implementation.cfiles()
|
|
|
|
hfiles = implementation.hfiles()
|
2019-04-18 09:00:08 +01:00
|
|
|
result = helpers.run_subprocess(
|
|
|
|
['astyle',
|
|
|
|
'--dry-run',
|
|
|
|
'--options=../.astylerc',
|
|
|
|
*cfiles,
|
|
|
|
*hfiles])
|
2019-07-29 09:38:25 +01:00
|
|
|
assert 'Formatted' not in result
|
2019-02-27 14:50:25 +00:00
|
|
|
|
|
|
|
|
2019-07-29 09:38:25 +01:00
|
|
|
if __name__ == '__main__':
|
|
|
|
import sys
|
|
|
|
pytest.main(sys.argv)
|