12 lines
474 B
Python
12 lines
474 B
Python
"""Overflow must fail explicitly, including builds with disabled assertions."""
|
|
import argparse
|
|
import subprocess
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("--test", required=True)
|
|
args = parser.parse_args()
|
|
result = subprocess.run([args.test, "--stride-overflow"], capture_output=True, text=True)
|
|
assert result.returncode != 0
|
|
assert "row-major strides are not representable in int64_t" in result.stderr, result.stderr
|
|
assert "Assertion" not in result.stderr
|