mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-07 06:42:56 +03:00
Simplify expression normalization
No need to split lines, or remove whitespace after removing whitespace. No behavior change.
This commit is contained in:
@@ -307,8 +307,7 @@ def normalize(expr):
|
|||||||
"""Normalize the C expression so as not to care about trivial differences.
|
"""Normalize the C expression so as not to care about trivial differences.
|
||||||
Currently "trivial differences" means whitespace.
|
Currently "trivial differences" means whitespace.
|
||||||
"""
|
"""
|
||||||
expr = re.sub(NORMALIZE_STRIP_RE, '', expr, len(expr))
|
return re.sub(NORMALIZE_STRIP_RE, '', expr)
|
||||||
return expr.strip().split('\n')
|
|
||||||
|
|
||||||
def do_test(options, inputs, type_word, names):
|
def do_test(options, inputs, type_word, names):
|
||||||
"""Test psa_constant_names for the specified type.
|
"""Test psa_constant_names for the specified type.
|
||||||
|
Reference in New Issue
Block a user